What can you "new"

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Mar 23 07:55:11 PDT 2009


Don wrote:
> Andrei Alexandrescu wrote:
>> new is a really bad construct. I'm very unhappy that D inherited it.
> 
> Care to elaborate?

I just did in the PS :o). New is not uniform: you can't use it easily to 
allocate a pointer to a dynamic array, or even a fixed-size array. Why? 
Because new is syntactically ill-conceived. It also allocates two 
keywords for no good reason.

new should disappear and delete should be an unsafe function.


Andrei



More information about the Digitalmars-d mailing list