Classes in D and C++

Daniel Keep daniel.keep.lists at gmail.com
Mon Mar 5 01:15:04 PST 2007



Walter Bright wrote:
> Uno wrote:
>>> Its not possible it seems to do e.g this:
>>>
>>> X  x(3);
>>>
>>> rather you have to do:
>>>
>>> X x = new X(3);
>>
>> Yep, I don't like that syntax too. Everywhere news.. And although D
>> has many great features such small things prevent me to switch to D.
>>
> 
> You can do:
> 
>     auto x = X(3);
> 
> and x will be put on the stack.

Surely you mean

  scope x = X(3);

Or did scope get rolled back into the auto keyword again while I wasn't
looking? >_<

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list