Hacker News new | past | comments | ask | show | jobs | submit login

> WASM is a vm and JS is a language.

I'm talking about compiling to WASM vs. compiling to JS. Calling something a VM or a language is mostly a matter of convention. x86 machine code can also be viewed as a language, and compilers certainly don't care. A compiler translates code in one language into code in another (there is no precise definition for "transpile", which is why compiler people hate that word; colloquially "transpile" just means that the compilation's target language is considered to be at a similar abstraction level to the source).

> Why would anybody want to implement it in Javascript?

Why would anybody want to implement it in WASM? If it's so that it could run in the browser, then compiling BEAM bytecode to JS would achieve the same goal, be easier to write and would likely result in a smaller and faster deliverable.

> Also BEAM GC isn't some generic GC, there's tons of crazy work going on with it to work with the Actor concurrency model.

There's nothing crazy going on in BEAM. As far as VMs go, it's near the bottom in terms of sophistication.




Exactly true! C, for example is a VM!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: