Is DMD 0.166 RC 1.0?
Ivan Senji
ivan.senji_REMOVE_ at _THIS__gmail.com
Mon Sep 4 04:07:55 PDT 2006
xs0 wrote:
> Ivan Senji wrote:
>> xs0 wrote:
>>> Would you care for any language that (regardless of other features)
>>> made you type "return a+b" like this:
>>>
>>> accumulator foo;
>>> foo.add(a);
>>> foo.add(b);
>>> return foo.result;
>>>
>>> Now, consider the remarkable similarity between that case and "auto
>>> foo = new int[3][4][5]" versus
>>
>> Actually this works. But foo cannot be initialized with an initializer.
>
> OK, that particular statement might work, but it doesn't do what you
> expect:
>
> int[][][] foo = new int[3][4][5];
>
> results in
>
> arr.d(4): cannot implicitly convert expression (new int[3][4][](5)) of
> type int[3][4][] to int[][][]
>
> and more importantly, this doesn't work:
>
> int a=3, b=4, c=5;
> auto foo = new int[a][b][c];
Oops, now I remember that it doesn't work. I got my hopes up to soon :)
More information about the Digitalmars-d-announce
mailing list