Top 5
Benji Smith
dlanguage at benjismith.net
Fri Oct 10 12:20:48 PDT 2008
Andrei Alexandrescu wrote:
> Jarrett Billingsley wrote:
>> What Andrei is implying, then is that for dynamic arrays, we should
>> have to use the (already-legal) "new T[](n)" form, and "new T[x]"
>> would mean to allocate a statically-sized array on the heap.
>
> Well yah but I think this will confuse people coming from C++. I just
> wish new was abolished entirely:
>
> struct S {}
> auto a = S();
> auto b = Object();
> auto c = char[](15);
> auto d = char[15]();
>
> So in general Type followed by "(" ...optional arguments... ")" yields a
> value.
>
>
> Andrei
Interesting. I could live with that.
--benji
More information about the Digitalmars-d
mailing list