Mark partial functions as such
Oliver Charles
ollie at ocharles.org.uk
Fri Aug 31 16:59:59 UTC 2018
On Fri, Aug 31, 2018 at 5:21 PM Tikhon Jelvis <tikhon at jelv.is> wrote:
> Deeper questions of partiality aside, if a function can throw exceptions, the documentation should spell this out *explicitly*, ideally also specifying what the type of the exception may be. To me, this is a *minimum* standard to expect from documentation in any language with exceptions.
Is this to be applied transitively? It has to be, to meet your
criteria, but this is a fairly unrealistic expectation to put on
library authors. If it's not applied transitively, then the
documentation creates a false sense of security - "catch these
exceptions that *I* throw and you're good!". I really think this part
of exceptions is a tooling problem that we have to solve. Haddock
should be responsible for figuring this out.
Ollie
More information about the Libraries
mailing list