News for hackers. Stuff that matters.
Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe... by rapala on Friday May 06, 2011 @05:51PM (#2522616)
You also need to remember to use RAII, and that always requires creating a class. You also need to get RAII right, where as Python's with is implemented for you.

Also there's no mention about the fact that Java forces you to check for exceptions (well not for unchecked ones, but those should not be fatal, and I never really got their idea). You can't forget the try-catch.

Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe... by shasta on Friday May 06, 2011 @06:11PM (#2522669)
The library author needs to remember to use RAII, but the client doesn't need to remember anything (as in his examples). Whereas with 'with' it's the opposite - the client has to remember to use it.