Skip to content
snoyberg edited this page Jan 2, 2013 · 2 revisions
  • Create user-friendly Show instances for Exception datatypes. That way, if the message makes it to the user, it will mean something.
    • I don't do this part enough, but in theory: Whenever you have a library which calls a non-user-facing library that can throw exceptions, wrap those exceptions in an exception type for your library. Example: I should really modify http-conduit to wrap exceptions from network in something more user-friendly.
  • When writing your Haddocks, add "Since X.Y.Z" version notes. It takes you very little time to add, but can save someone a lot of trouble when they are adding lower version bounds. I first saw this in Haskell in John Millikin's enumerator package, and tried to adopt it myself. But it's a long-time tradition in Java.
Clone this wiki locally