Errors, Contracts and Generality

November 2015

This post is a draft. Content may be incomplete or missing.

Some conflated ideas to tease apart here.

  1. Errors occur due to either external events or internally by not honoring a contract
  2. Contracts are more complex and harder to honor the more general a procedure is
  3. More general code has more error cases
  4. If you’re writing a function and it has a lot of error cases, check if you can eliminate some of them by removing unnecessary generality from the procedure

As always, simplest is best