The new Mono GC

Walter Bright newshound2 at digitalmars.com
Sat Sep 4 13:08:38 PDT 2010


bearophile wrote:
> Walter Bright:
>> That's true if the language (like Java) uses a *lot* of gc allocation. D 
>> programs tend to do much less because it has support for value types.
> 
> This is true, unless: - Someone that knows well enough Java (and badly D)
> writes a D program. Today it's hard to find people that know D; - Someone
> ports a Java program to D;

The language should focus on supporting D programs best, not Java programs.
Putting write barriers on every write through a pointer will destroy 
performance. In Java, every write through a reference refers to the heap. This 
is not remotely true of D programs.

And, as was mentioned previous, you can't do write barriers halfway. You've got 
to do it everywhere, meaning that simple interfacing to C code is destroyed.


> - Someone writes some D code where OOP (or
> automatic heap activity management) is more necessary (commercial software?).

I don't think it makes sense to characterize commercial software as eschewing 
value types.



More information about the Digitalmars-d mailing list