Hacker News new | ask | show | jobs
by jacobp100 726 days ago
Python has two garbage collectors - reference counting, and tracing

Reference counting does not handle circular references, and tracing does

Tracing collectors have to be able to read all the references of objects to work. The difficulty is that some of those objects or references to objects are in the stack - or in simpler terms, these are objects and references that only one function can read and understand. In C there are some non-standard extensions that let you do this to varying degree of success. In WASM, this is prohibited by design, because it’s a safety issue