Manual memory management in D2
Rainer Deyke
rainerd at eldwood.com
Sun Jul 11 21:46:31 PDT 2010
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.
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d
mailing list