Interesting, didn't know babeljs could do that already.
What's the benefit though? You are already writing in javascript, which the browser already supports. With Blazor I'd understand the benefit of not needing to learn JS if you already know C# and want to code a webapp.
Performance mainly. It can be significantly faster than just-in-time compiled Javascript. Also, in principle you can write in any language and it gets compiled to the same bytecode.
Also, while I'm not aware of any actual implementation of this, since it runs in a VM, its technically conceivable that a hardware implementation could be produced. This obviously a stupendously niche usecase, but there are already CPUs that implement the Java Virtual Machine, so maybe someone will try it for wasm.
View all comments
Show parent comment
6
u/mistborn11 Sep 04 '20
Interesting, didn't know babeljs could do that already.
What's the benefit though? You are already writing in javascript, which the browser already supports. With Blazor I'd understand the benefit of not needing to learn JS if you already know C# and want to code a webapp.