Hacker News new | ask | show | jobs
by pcwalton 2802 days ago
> Virtualization technology is quite mature now, and allows running low-level code (that can access the stack) with safety. Servers run this type of code all the time!

Except that "low-level code" is not portable. Which is why we have wasm instead of NaCl.

Incidentally, stack isn't the interesting part. For a good GC on register-rich architectures like AArch64 you really want register roots, which is hard to abstract over portably.

> Also, language designers do not want a GC embedded in their assembly language; they want to implement it themselves, using their own constraints.

I was a language designer in a former life, and I very much want a GC in Web Assembly. Web Assembly doesn't exist in a vacuum: it needs to interact with the DOM for I/O, in much the same way as a Windows program needs to interact with COM to do lots of things. Having two tracing garbage collectors that trace different objects is a nightmare, so I want the same GC that the DOM uses. That is exactly what the wasm GC proposal is.