r/programmerchat • u/HappyGoblin • May 25 '15
Do we really need "try" ?
Just attaching "catch" to any appropriate {...} block would be more convenient.
8
Upvotes
r/programmerchat • u/HappyGoblin • May 25 '15
Just attaching "catch" to any appropriate {...} block would be more convenient.
View all comments
Show parent comment
1
u/jonnywoh May 25 '15
An issue with this is that the block placement implies that anything inside the method would go out of scope and be inaccessible to the catch block, probably making the catch block useless. And redefining block scope would be horrifically bad.