3 ms·
> Haskell has a somewhat unique garbage collector based on the fact that all data is immutable. They can take shortcuts because older references can't refer to
by whateveracct 6y ago
> Haskell has a somewhat unique garbage collector based on the fact that all data is immutable. They can take shortcuts because older references can't refer to newer references.
I don't think this is true? Because laziness is really heavily mutable under the hood. Not to mention that it has mutable references. But maybe there are some tricks in the GC I'm not aware of.
- cogman10 6y agoIf you're interested in a fun read, they've published a paper on how they do garbage collection. http://simonmar.github.io/bib/papers/parallel-gc.pdf http://simonmar.github.io/bib/papers/parallel-gc.pdf