News for hackers. Stuff that matters.
Re:Rule of Zero (C++) by pjmlp on Friday November 23, 2012 @10:11AM (#4822421)
True, however you have mechanisms like using, with, try, scope, defer that GC enabled languages offer.

C++ destructors benefit is that you don't forget to call such constructs.

Re:Rule of Zero (C++) by strictfp on Friday November 23, 2012 @10:32AM (#4822486)
Most (all?) of these cannot cope with trees of objects, plus that they leave the responsibility of destructing to the user of the object. So they are just as ugly as external locking. Problem is that very few people understand this, so they implement "using" and feel content. I would give an arm and a leg for RAII on the JVM.
Re:Rule of Zero (C++) by pjmlp on Friday November 23, 2012 @12:28PM (#4822941)
> Most (all?) of these cannot cope with trees of objects

You can if all "destructors" take care of also closing the internal resources, thus initiating a cascade process of the object owned by them.

But you're right, this leaves the responsibility in the user's side.

> I would give an arm and a leg for RAII on the JVM.

At least they finally added the "using" concept.

In a few more versions maybe they get to add values.