OSNews article about C++09 degenerates into C++ vs. D discussion

Mike Capp mike.capp at gmail.com
Tue Nov 21 06:16:12 PST 2006


Sean Kelly wrote:

> A lot of this can be handled by "scope."  Though I grant that using
> objects for the rest and relying on the GC for clean-up is possibly not
> ideal for resources that must be cleaned up in a timely manner.

Indeed. Long, long ago I suggested disallowing destructors for classes not
declared 'scope' (or 'auto', as it was then), on the grounds that if you need
stuff done there you really don't want to rely on the GC to do it.

It was a bit of a Devil's Advocate thing, but the response was surprisingly
positive, and (as I recall) nobody came up with a counterexample where a dtor was
needed but timeliness wasn't.




More information about the Digitalmars-d mailing list