On Variable References

weaselcat via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 21 14:13:26 PST 2015


On Wednesday, 21 January 2015 at 17:14:29 UTC, Meta wrote:
> On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw 
> wrote:
>> On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw 
>> wrote:
>>>   int x;
>>>   auto ref xr;
>>
>> Correction: I, of course mean,
>>
>>    int x = 42;
>>    auto ref xr = x;
>
> Walter is strongly against adding references a la C++ to D, as 
> he believes they are too complicated and bug prone. He's made 
> several posts on this, but I can't find them now.

Artificial constraints like this and no default constructor 
implementations for structs makes D annoying to use for 
programming that relies heavily on deterministic resource 
management tbh.


More information about the Digitalmars-d-learn mailing list