On 08/10/2011 08:45, Trịnh Quang Anh wrote: > IMO it's hard to apply a single GC design to many different languages, as > each language has it's distinct properties that require the GC to work in s > different manner.
Out of curiosity, did anybody try to stick a recent (conservative) bdwgc* in and see how D's gc compares to it? It allows to embed some basic type-info regarding what should be considered pointer or not**. *: https://github.com/ivmai/bdwgc/ **: https://github.com/ivmai/bdwgc/blob/master/include/gc_typed.h > > 2011/10/8 bearophile <[email protected]> > >> 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 >> >
