4 ms·
For some reason, it seems like you didn't read my comments. I'm not writing a WASM interpreter or JIT compiler... that would be quite straightforward. I'm attem
by iammisc 5y ago
For some reason, it seems like you didn't read my comments. I'm not writing a WASM interpreter or JIT compiler... that would be quite straightforward. I'm attempting to implement a compiler backend for an existing programming language so that it can target WebAssembly. Since this is a functional language, it doesn't do things like have 'structured conditionals' (i.e., prodecural-like If/For/While statements and loops). Instead, it has recursion, which WebAssembly is terrible at. Not that other VMs are much better. You can make a claim this is about performance, but not in good faith. JMP is one instruction on X86_64 and B and friends on ARM are similar.
All these VMs and runtimes want to force you into particular ways of thinking about programming. This is terrible for the community. You can say Web Assembly is meant to be an open standard and you can sing that till the cows come home, but leaving out basic support for things like TCO, direct jumps, etc that are vital for compiling any non-procedural language, is just inexcusable at this point.