Constraints on definition of `length` should be strengthened

Sven Panne svenpanne at gmail.com
Wed Apr 5 18:15:07 UTC 2017


2017-04-05 18:18 GMT+02:00 Ben Franksen <ben.franksen at online.de>:

> And let's not forget Either which IMO should be regarded as an unbiased
> choice. I don't have a proposal for the name, though.
>

In the dark ages of Haskell's library design, i.e. a long, long time ago,
in a distant past, the time where people could actually write significant
code without using at least 20 LANGUAGE pragmas ;-), we discussed this
already, see e.g. the thread starting at
http://code.haskell.org/~dons/haskell-1990-2000/msg07215.html. The final
outcome was: Although something like Error/OK would have been better than
Left/Right, a slight majority preferred to give a bias to Either. The
reasoning was that using "Right" for a "wrong" outcome (i.e. failure) would
be a bit obscure, and there was already quite some code using it in the way
we still do today. The bias is even explicitly documented in the Haddock
docs for Data.Either for ages, so it would not be very wise to change the
meaning here after roughly 2 decades.

Of course the question remains: What is the totally unbiased standard sum
type for 2 alternatives?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170405/ebb65491/attachment.html>


More information about the Libraries mailing list