Hi Brandon,
> ... you did not think out your program sufficiently beforehand ...
Yes, that is quite possible. I consider myself an FP beginner still.
I encountered that mixing Maybe and Either problem few months ago and I think it was about using parseUri and simpleHTTP and I had to `case` them separately to provide a meaningful error message. Haven't been able to simply chain them. In other words, it was not a nice looking function.
Maybe today I'd write it differently.
> ... what exactly is the problem with using appropriate data types in appropriate places ...
It is a good thing. Very good. But I do not think all library writers are using it in correct places. But that's another problem.
vlatko
-------- Original Message --------
Subject: Re: [Haskell-cafe] Why Maybe exists if there is Either?
From: Brandon Allbery <allbery.b@gmail.com>
To: Vlatko Bašić <vlatko.basic@gmail.com>
Cc: Johannes Erber <Hannes_E@gmx.de>, "haskell-cafe@haskell.org" <haskell-cafe@haskell.org>
Date: 09.01.2014 17:32
On Thu, Jan 9, 2014 at 11:25 AM, Vlatko Basic <vlatko.basic@gmail.com> wrote:--
> ... is letting the programmer do what they need to do with a minimum of fuss or extra work ...
But doesn't the need of mixing Maybe and Either cause more work for the programmer? Programmer of library, or programmer using the library?
Arguably if you need to switch from Maybe to Either then you did not think out your program sufficiently beforehand. And if you did think it out, what exactly is the problem with using appropriate data types in appropriate places?
brandon s allbery kf8nh sine nomine associatesunix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe