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