Destructor semantics

Michel Fortin michel.fortin at michelf.com
Wed Aug 11 15:12:54 PDT 2010


On 2010-08-11 17:08:49 -0400, Walter Bright <newshound2 at digitalmars.com> said:

> Jonathan M Davis wrote:
>> This needs to be sorted out in a manner that minimizes how much pain it 
>> causes for the typical programmer in their typical programming tasks. 
>> Destructors should not be this much trouble.
> 
> I agree. Having too many interacting options just winds up confusing 
> the heck out of people.

Typically, a destructor is easy to write; it's the finalizer that is 
tricky. Separating these two concepts would help a lot.

I also filled this bug against Phobos today:
<http://d.puremagic.com/issues/show_bug.cgi?id=4624>

It shows how easily this kind of bug can slip in.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list