David Luposchainsky dluposchainsky at googlemail.com
Tue Aug 13 23:09:16 CEST 2013


On 2013-08-13 22:57, Gabriel Gonzalez wrote:
> I don't really see the value in `Except` either, but it's there to
> satisfy Ross who wants an `Identity`-specialized version of the monad
> transformer.

I think at this rate, we're running out of terms for "crashing" pretty
soon. Exception vs. error is bad enough, and now some want to add Except
to that list.

On the other hand, EitherT already exists in a current and used library,
it is very clear what that transformer does, and it goes hand in hand
with MaybeT.

Furthermore I think Hennings objections are not very convincing:

- Monad for pairs duplicates Writer, which is existing functionality but
without the newtype wrapper safety. There is no equivalent for this with
Either.

- Num for functions - I have yet to see an example where that is
beneficial beyond "funny how that works".

- Ord for complex numbers is alarming for the mathematics police, but a
useful hack if you want to store them in a Map or something. A class
"ArbitraryOrd" would be better for this, but for the time being we're
stuck to using newtype wrappers. I don't see what's mathematically wrong
with EitherT (neither on this scale nor on any other).

David




More information about the Libraries mailing list