Bear Bibeault wrote:Look at the code that started this thread. You find all the unnecessary try and catching in it acceptable?
Bear Bibeault wrote:I disagree. It adds to code bloat and makes the code unnecessarily complex and confusing. Especially to those that don't know any better. Look at the code that started this thread. You find all the unnecessary try and catching in it acceptable?
Ernest Friedman-Hill wrote:
Returning from the method in which the local variable is declared has the same effect, without running any extra code. This kind of thing is a terrible anti-pattern; it's pretty much cargo-cult programming.
Here, the variables will disappear immediately after the nulling code, and so that's just silly.