My thoughts & experiences with D so far, as a novice D coder

Brad Anderson eco at gnuk.net
Wed Mar 27 10:34:52 PDT 2013


On Wednesday, 27 March 2013 at 17:23:01 UTC, Timon Gehr wrote:
> On 03/27/2013 05:04 PM, deadalnix wrote:
>> On Wednesday, 27 March 2013 at 15:34:20 UTC, Vidar Wahlberg
>>> ...
>>> - "Foo foo = new Foo();" for global variables/class members. 
>>> Now you
>>> must "Foo foo; static this() { foo = new Foo(); }".
>>
>> Yes, as it imply an heap allocation. It is an harder problem 
>> that it
>> seems as all thoses object could reference themselves.
>
> Just serialize the CTFE object graph into the static data 
> segment.

I believe that's what this pull aims to do:

https://github.com/D-Programming-Language/dmd/pull/1724


More information about the Digitalmars-d mailing list