Re:You’re better off using Exceptions
by appleiigs on Monday February 03, 2020 @12:40PM
(#22226623)
Yes, poorly designed API, but we still have to handle them and the world is filled with them. So you can have a structure that works for the real world, or you can have an ideological structure the stubbornly insists that you should know better. "bad programmer! you should know if the key exists or fail".
[ Parent
| on HN ]
Re:You’re better off using Exceptions
by seanmcdirmid on Monday February 03, 2020 @01:01PM
(#22226932)
Poorly designed APIs provide little evidence on exceptions being bad or not since the APIs themselves have big problems.
This thread is discussing whether exceptions are bad for handling unexceptional events. We are arguing that APIs that throw exceptions for valid program states, such as a missing key for some user input, is an abuse of exceptions. There are lots of these APIs in the world and we find that objectionable. You seem to agree with all of that, but you also present yourself as disagreeing with us, and it’s not at all clear what you’re disagreeing with specifically? Are you just being contrarian for its own sake or are we misunderstanding each other?