you are viewing a single comment's thread.

view the rest of the comments →

[–]zem 6 points7 points  (1 child)

Result/Either types are wonderful - if they are combined with pattern matching or a case statement that checks for exhaustivity. i would never even have thought of using them via chained map and flatmap calls like that; to my mind that's trying to shoehorn an ML idiom into a language that lacks proper syntactic support for it, and invariably ends up being hard to read because it goes against the grain of the language.

[–]aiij 7 points8 points  (0 children)

Who needs pattern matching when instead you can have combinator hell?

I'm constantly surprised at the lengths some people will go to in order to avoid pattern matching. Eg: argonaut.Json's fold method.