
Massive Update To Retyped - andrey_ch
https://blog.bridge.net/massive-update-to-retyped-91248454e72e
======
yodon
(Retyped is part of the Bridge.NET C# -> JS/TypeScript converter)

It’s super exciting too see Bridge maintaining its place in a world that
includes both C# -> WebAsm and mature TypeScript ecosystems.

I’d started to wonder if Bridge still had a role to play now that those two
ecosystems are maturing, but I think the marshalling cost between WebAsm and
JS/Dom is likely to discourage full WebAsm implementations in many cases, and
if it does the ability to do seamless code sharing between frontend TypeScript
and backend C# is pretty killer.

~~~
longdudefromnl
Have you seen
'[https://github.com/aspnet/blazor'](https://github.com/aspnet/blazor')? Looks
(very) promising. I haven't used Retyped myself, but from the looks of it
Blazor does more or less the same thing but maybe better?

~~~
yodon
Blazor is an example of C# -> WebAssembly tech, which is related to but
different from ReTyped’s C# -> TypeScript tech. It’s easy to take a quick look
and conclude compiling to WebAssembly must be better than compiling to
TypeScript, but it’s far from clear that’s always the case at this point.
WebAssembly runs faster than vanilla JS when you are inside the WebAssembly
stack but there are costs to cross back and forth between WebAssembly and the
Dom/vanilla JS and there are also non-trivial memory management issues with
WebAssembly. The memory management situation will hopefully be fixed a few
browser versions from now. It’s less clear whether there is a good fix for the
WebAsm <-> JS marshalling cost coming in the near future.

~~~
andrey_ch
Take a look at the following thread about WASM performance, might be
interesting to you:
[https://www.reddit.com/r/csharp/comments/8gjx3v/a_small_perf...](https://www.reddit.com/r/csharp/comments/8gjx3v/a_small_performance_comparison_of_monowasmblazor/)

Benchmark results for Bridge.NET are provided here:
[https://github.com/stefan-
schweiger/dotWasmBenchmark](https://github.com/stefan-
schweiger/dotWasmBenchmark)

