3 ms·
C and ASM don't have a GC either, and yet we can build GC collected languages on top of them. So it will be eventually be solved in the same fashion: By buildin
by Matthias247 8y ago
C and ASM don't have a GC either, and yet we can build GC collected languages on top of them. So it will be eventually be solved in the same fashion: By building a runtime environment on top of the underlying machine, which performs memory management incl. garbage collection.
Depending on how the runtime for "native Haskell" is implemented, the effort might be everything from just cross-compile it to building a completely separate runtime.
- kazinator 8y agoIn assembly language, you can build an accurate garbage collector for your assembly language application. There are no hidden "not user servicable" areas in the run-time, like in C. You can set up your calling and framing conventions so the GC can trace the stack and know exactly where the root pointers are.