
31 Oct
2006
31 Oct
'06
11:54 a.m.
On 10/31/06, Bulat Ziganshin
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!