3 ms·
> We've been interfacing C with e.g. Python without needing a garbage collector that crosses language boundaries. So why would we need one now? Because C doesn
by rkangel 8y ago
> We've been interfacing C with e.g. Python without needing a garbage collector that crosses language boundaries. So why would we need one now?
Because C doesn't need garbage collection, it uses 'manual' memory management. This scenario is exactly analogous to the WASM-JS world that exists now (WASM is manual, and JS is GC).
The goal here is to have a GC that's usable in WASM, and WASM is going to be interoperating a lot with JS for many applications, so it needs to cope with that. A better analogy in this case would be IronPython which is Python built on the .NET framework rather than C. In that case, the Python GC is the .NET GC, so that objects can be passed back and forth 'between worlds'.