On Variable References
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jan 22 09:41:44 PST 2015
On Thursday, 22 January 2015 at 14:52:26 UTC, Marc Schütz wrote:
> 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.
>
> In DIP69, he himself proposed `ref` locals. However, that's not
> the same as "references a la C++".
Hmm, it seems that he did. If D were to allow creating ref
variables, wouldn't D ref be more or less like in C++, then?
Aside from the weirder things like T&& and such.
More information about the Digitalmars-d-learn
mailing list