Manual memory management in D2

Eric Poggel dnewsgroup at yage3d.net
Sun Jul 11 22:12:16 PDT 2010


On 7/12/2010 12:46 AM, Rainer Deyke wrote:
> On 7/11/2010 22:24, Vladimir Panteleev wrote:
>> But the same could be said about any language feature! Deprecating the
>> delete statement, and increasing the verbosity of the code for the sake
>> of customizability appears absurd to me. Why not move the implementation
>> of the delete statement to the standard library (if it's not there
>> already) and get it to do the same as the fancy new clear() thing?
>
> Semantically speaking, 'delete' is just a function, and not a
> particularly common one.  This is not the case with most other language
> features.
>
> Turning 'delete' into a real function simplifies the language grammar,
> frees a keyword, and makes code that uses it more consistent with the
> rest of D, all at essentially no cost.
>
>
It's yet another import statement.


More information about the Digitalmars-d mailing list