d future or plans for d3

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Dec 18 15:29:23 PST 2011


On 12/18/11 5:18 PM, Timon Gehr wrote:
> On 12/19/2011 12:11 AM, Vladimir Panteleev wrote:
>> On Sunday, 18 December 2011 at 23:02:17 UTC, Timon Gehr wrote:
>>> It is an unilateral improvement if both options are kept open. I don't
>>> see a reason to cease support for the current GC model.
>>
>> I believe that currently the plan does not include providing this choice.
>>
>
> That would strike me as odd. Andrei/Walter?

The plan is in too early a stage to even discuss that choice.

>>> Furthermore, a generational GC performs much better than a simple
>>> mark-sweep GC.
>>
>> Unless you change the way references work, generational and "precise"
>> aspects of a GC are orthogonal.
>
> You are right. I have had in mind a generational GC that uses a copying
> collector for the nursery as this is what most state-of-the-art VM GCs do.
>
>> Also, D can't have a completely precise
>> GC as long as it has unions and can pass managed memory to C code.
>
> We can change the way unions are layed out. The compiler can mark GC
> memory passed to a C function as non-movable, or passing GC memory to a
> C function can be made illegal if the GC is enabled.

Unions will be conservative. The golden standard is that SafeD can't use 
them or anything that forces conservative approaches.


Andrei


More information about the Digitalmars-d mailing list