Top 5
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 10 12:57:28 PDT 2008
Sergey Gromov wrote:
> Fri, 10 Oct 2008 13:24:51 -0500,
> 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.
>
> Type constructors? Nice. You will have a hard time justifying the
> delete keyword though.
That's even more useless. It should be a library function.
Andrei
More information about the Digitalmars-d
mailing list