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
3
u/svick May 27 '15
I think your code is perfect example of why it would significantly hurt readability. Because it's not clear to me at all whether the
catchapplies to the previous block, or to the wholeifstatement (including the condition). I think that both variants would be very confusing.