3 ms·
It's only bad if you read "YAGN Exceptions"
by dmichulke 4y ago
It's only bad if you read "YAGN Exceptions"
- enriquto 4y agoBut this would be very good advice! Exceptions (a.k.a. modern-flavored COMEFROM statements[0]) are extremely confusing and have no place in a clean codebase. [0] https://en.wikipedia.org/wiki/COMEFROM https://en.wikipedia.org/wiki/COMEFROM
- wruza 4y agoExceptions do not specify from where exactly they should “come from” and are two-way protocol akin to setjmp/longjmp. Situations where exit through few levels of stack is required do happen regardless of code cleanness, and the only alternative is to pair every call with a flow control statement, turn primary return value into a status, and add two out-arguments for error and result. Some people love this, some not really.
- goto11 4y agoExceptions are the worst, except for any other way of handling errors.
- deleted 4y ago[deleted]
- valenterry 4y agoFair enough.