deprecated delete and manual memory management

so so at so.so
Wed Apr 27 13:37:49 PDT 2011


> It'd create template bloat and uglier syntax (expecially confusing for
> people coming from about any other popular OO language) for a really
> common, standard feature.
> These drawbacks are acceptable for custom allocation and other stuff the
> average user shouldn't care about, but not for an elemental feature like
> "new".
>
> Cheers,
> - Daniel

For the template bloat, yes that would be a problem.
But it is not ugly! Take it back! :)

auto a = new A;
auto a = new!A();

auto b = new B(5);
auto b = new!B(5);

For the confusion part, the real confusion (rather shock) awaits when they  
get to the part where they see "new" but no "delete".
We could argue against this all the way, but to every single of us "new"  
and "delete" are a pair.


More information about the Digitalmars-d mailing list