Hacker News new | past | comments | ask | show | jobs | submit login

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.



> 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: