darcs patch: Adding isLeft, isRight, fromLeft, fromRight, splitEithers

Samuel Bronson naesten at gmail.com
Tue Oct 31 06:54:19 EST 2006


On 10/31/06, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:

> > I'm not so keen on isLeft, isRight, fromLeft and fromRight.  Pattern
> > matching is clearer and safer: at the point you make the decision, the
> > type system has the extra information about the branch you've chosen.
> > It also pushes the programmer to put the decision and the use of the data
> > together, another good thing.  The isJust/fromJust combination is already
> > a rich source of bugs; we don't need more.  (Same goes for null/head/tail,
> > of course.)

What? Type system? Type system doesn't have anything to do with
pattern match failure!


More information about the Libraries mailing list