logoalt Hacker News

pizlonatoryesterday at 4:40 PM1 replyview on HN

Then give me a counterargument instead of just saying that I'm wrong.

My points are validated by the reality that most of the web is JavaScript, to the point that you'd have a hard time observing degradation of experience if you disabled the wasm engine.


Replies

flohofwoeyesterday at 4:52 PM

I created and maintain a couple of WASM projects and have not experienced the problems you describe:

- https://floooh.github.io/tiny8bit/

- https://floooh.github.io/sokol-webgpu/

- https://floooh.github.io/visualz80remix/

- https://floooh.github.io/doom-sokol/

All those projects also compile into native Windows/Linux/macOS/Android/iOS executables without any code changes, but compiling to WASM and running in web browsers is the most painless way to get this stuff to users.

Dealing with minor differences of web APIs in different browsers is a rare thing and can be dealt with in WASM just the same as in JS: a simple if-else will do the job, no dynamic type system needed (apart from that, WASM doesn't have a "type system" in the first place, just like CPU instruction sets don't have one - unless you count integer and float types as type system"). Alternatively it's trivial to call out into Javascript. In Emscripten you can even mix C/C++ and Javascript in the same source file.

E.g. for me, WASM is already a '1st class citizen of the web' no WASM component model needed.

show 2 replies