Manual memory management in D2
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jul 13 08:30:26 PDT 2010
On 07/13/2010 09:45 AM, Francisco Almeida wrote:
> I agree, deprecating a fundamental operator like delete should not be
> taken lightly.
I agree deprecation shouldn't be taken lightly, but delete is not a
fundamental operator - it could and should be defined at most as a
simple function.
> A lot of us prefer to manage the memory manually and do
> RAII for our own reasons. By all means, add clear(obj) to the
> language/standard library, but both methods should always be available.
> There is no valid reason to coerce the rest of us into depending on the
> garbage collector. If I wanted to program in a language that imposes
> that on me, I would be programming in Java.
Agreed. What would be a good name for a function that does what delete does?
Andrei
More information about the Digitalmars-d
mailing list