3 ms·
He means exceptions are not for common control flow that shows up everywhere, like a return value. You want an exceptional control flow change when your hard dr
by naasking 3y ago
He means exceptions are not for common control flow that shows up everywhere, like a return value. You want an exceptional control flow change when your hard drive runs out of storage, but you don't want exceptional control flow change when your hashtable doesn't have the key you're looking for.
The categories and frequency of these conditions are very different.
- kelseyfrog 3y agoHmmm, sounds like it just transforms into a Sorites paradox, no?
- naasking 3y agoI don't think cases encountered in real work are really that unclear. It can sometimes seem unclear if you're used to language semantics that are inherently riddled with possible error states (like languages that allow null).