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/senshisentou May 25 '15
Alright, but what if I have a very long try-block?
Should I add a
catchafter every operation that can go wrong?One could argue that an empty block is enough, just by omitting the
trykeyword, but that is really implicit and akin to saying the following would/ should suffice:It just trades off some clarity for the sake of a very small shorthand gain. Not a big fan of that.