3 ms·
Someone actually has to implement the web browser / "tech stack". Web assembly, despite it's name, is an interpreted language. It is not magic. Interpreted lang
by dahfizz 4y ago
Someone actually has to implement the web browser / "tech stack". Web assembly, despite it's name, is an interpreted language. It is not magic. Interpreted languages need an interpreter (written in C).
- hardware2win 4y agoWhy written in C? If C is just wrapper over asm Then emit it from any other lang
- dahfizz 4y agoBecause, as the article states, the OS interface is C. In order to do anything useful at all in your code, you need to call through the C API of your operating system. To replace this, you would need another compiled language. It can't be "any other lang" - it needs to be something compiled down to machine code that can be directly executed on your CPU. So you could write a new OS that presents an interface in Rust, or Zig, but never WASM.
- pjmlp 4y agoIBM and Unisys mainframes and microcomputers beg to differ, with their language environments.
- lolinder 4y agoI don't think it has to be C, but it can't be any arbitrary language. It has to compile to machine code, and I wouldn't want to implement a VM in a garbage collected language because you need more fine-grained control over memory then those can provide. That last requirement rules out most languages with any significant community besides C/C++, Rust, Zig, and a few other even lower profile C replacements.