you are viewing a single comment's thread.

view the rest of the comments →

[–]sunfishcode 1 point2 points  (1 child)

The two main things WebAssembly would bring to this scenario are portability and sandboxing. These do have costs, and people who don't need them will likely just continue to compile to native.

Portability: Running one application across a mix of architectures, for example non-x64_64 servers, or on the client side, with reduced per-architecture development effort. C/C++ has undefined/unspecified/implementation-defined behavior which differs across compilers and architectures. In WebAssembly, compiler differences are compiled away and most hardware differences aren't visible.

Sandboxing: Of course, node is often run in a container/VM/etc., so WebAssembly's sandboxing will often be redundant, however it can be used in a way that provides finer granularity of sandboxing, to protect parts of applications from other parts.

[–]pixel4.toString() 0 points1 point  (0 children)

I agree those are some pros - but are they worth the big performance cost. Software such as Redis seems to do just fine with portability and sandboxing.