Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Exceptions or return codes?.
Pros of Return Codes:
1) Return codes are typed
2) Return codes are cleaner than exceptions and can have additional associated data
3) Exceptions are easy to ignore
4) Return codes integrate well with third-party code (how would you use Exceptions and not blow your client's call stack?)
Error handling is hard, let's go shopping.
There are no comments on this comment yet.
Pros of Return Codes:
1) Return codes are typed
2) Return codes are cleaner than exceptions and can have additional associated data
3) Exceptions are easy to ignore
4) Return codes integrate well with third-party code (how would you use Exceptions and not blow your client's call stack?)
Error handling is hard, let's go shopping.