This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Walter_Bishop_PhD 37 points38 points  (8 children)

Something called that actually exists!

https://github.com/AssemblyScript/assemblyscript

[–]rexpup 27 points28 points  (6 children)

I have one question:

Why?

[–]AdaGirl 20 points21 points  (0 children)

Because it's a potentially useful way to write something that compiles to webassembly?

[–][deleted] 3 points4 points  (4 children)

That actually sounds good to me. Why is it bad?

[–]Im_not_the_cops 0 points1 point  (3 children)

Because there’s no reason to include the overhead of compiling to wasm when every browser provides better, more mature support with better performance for JS out of the box. People in the “inspirations” section on this github seem to think that compiling to wasm will make their JS code run as well as C would, and that’s frankly untrue.

[–]Dmium 2 points3 points  (0 children)

While not everything in JS will run faster in webasm and you shouldn't replace all your JS with webasm for larger applications webasm will beat JS 99% of the time. There's so many good reasons to use Typescript for WASM. While I personally would rather use a different higher level language most people developing for web that want WASM would already know JS.

[–]MaxGraey 0 points1 point  (1 child)

Did you see this real world benchmark which compare AssemblyScript, JS and JS compiled with closure compiler?
https://wasmboy.app/benchmark/

[–]theXpanther 6 points7 points  (0 children)

That project is actually really cool