d future or plans for d3
Andrew Wiley
wiley.andrew.j at gmail.com
Sun Dec 18 16:47:06 PST 2011
On Sun, Dec 18, 2011 at 5:55 PM, Timon Gehr <timon.gehr at gmx.ch> wrote:
> On 12/19/2011 12:45 AM, Vladimir Panteleev wrote:
>>
>> On Sunday, 18 December 2011 at 23:31:03 UTC, Timon Gehr wrote:
>>>
>>> On 12/19/2011 12:24 AM, Vladimir Panteleev wrote:
>>>>
>>>> On Sunday, 18 December 2011 at 23:18:22 UTC, Timon Gehr wrote:
>>>>>
>>>>> 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.
>>>>
>>>> These changes are too invasive for the language at this point, I
>>>> believe. We need to work with what we have.
>>>
>>>
>>> I disagree. Code that relies on other semantics would just have to use
>>> conservative GC.
>>
>>
>> Please elaborate on how you would hypothetically change D to accustom
>> such changes. I am having trouble imagining such an implementation that
>> would not have a considerable impact on D's performance.
>
>
> If you have an union
>
> union X{
> int x;
> int* y;
> }
>
> The compiler would just lay out x and y sequentially instead of at the same
> memory location. Alternatively, it could add a tag to each union.
Wait, what? So you would convert unions into structs and break every
semantic expectation a programmer might have?
This would remove unions from the language. Calling it anything else
is just silly.
More information about the Digitalmars-d
mailing list