[Haskell-cafe] Poor libraries documentation
derek.a.elkins at gmail.com
Wed Jan 30 21:55:08 EST 2008
On Wed, 2008-01-30 at 22:19 -0500, Anton van Straaten wrote:
> Derek Elkins wrote:
> > On Thu, 2008-01-31 at 02:18 +0000, Neil Mitchell wrote:
> >> It isn't something that would throw a C programmer off, but it is
> >> something that could confuse a pure Haskell programmer. And the only
> >> way I could be sure of radians versus degrees was by trying it out,
> >> not a great strategy for determining the implementation of functions!
> > Uh, why not? Often that's exactly what I do as checking even
> > conveniently located documentation is more time consuming than just
> > trying it.
> I agree, but at the risk of veering uncharacteristically off-topic for
> haskell-cafe, I think it's an interesting example of the degree of
> assurance about correctness we're willing to accept in practice, in real
> We discover a function called, say, "cos", probably by guessing it's
> name, run a very small number of simple tests on it, see the answers we
> expect, and decide that it's the function we want. Does anyone want to
> defend that on safety/correctness grounds? But some of us do it anyway.
It depends on the extent. Deciding between degrees and radians, this
works perfectly if you have any idea what you are doing. Arguably, this
-is- more defensible on a safety/correctness grounds than reading the
documentation. Documentation can be out of date or wrong or right but
the implementation is wrong. So it comes down to a matter of
So, to answer your question: yes.
More information about the Haskell-Cafe