Garbage collection book

bearophile bearophileHUGS at lycos.com
Fri Oct 7 19:38:35 PDT 2011


Caligo:

> I'm just wondering, does Glasgow Haskell Compile (GHC) have the most advanced GC?
> I remember reading where it said that GHC is like 10 years ahead of all the other compilers,
> or something to that effect.

If you want to find an advanced GC that is years ahead of all other ones, take a look at the garbage collectors inside the Oracle JavaVM.
Haskell is almost purely functional, and its GC has to do a work different from a Java or D GC. A D GC has to do a work different from a Java GC, and more similar to a C# GC (but not exactly the same of C# because I think in D there is a larger percentage of pinned down data). Even if it is not perfectly fit, I think the recently created good GC for the C# Mono is good enough for D, maybe with some tuning.
Unfortunately, despite being both Mono and D open source projects, there is a furiously intense "not invented here" syndrome in the whole planetary effort of Open Source. Every open source language seems to implement its own GC If you look at this situation from 15000 feet above it looks like an incredibly dumb situation. In practice once you get closer, you see incompatible open source licenses, and differences in the language semantics that make GC transplants hard or not so useful. Devil is in the details.

Bye,
bearophile


More information about the Digitalmars-d mailing list