The more I work with pattern matching, the less I like it. Patterns make for succinct code that's nice to read and convenient to write, but: (1/3)
-
Show this thread
-
Pattern matching functions, in the absence of first-class virtual patterns, are locked into a particular representation of your data. If the representation changes, the patterns must change too. And this can't really be automated (except maybe in bidirectional calculi). (2/3)
2 replies 1 retweet 9 likesShow this thread -
Also, you need exhaustiveness checking. In a typed language, this is absolutely not optional. But it's intractable in the general case! Recursion schemes are sound, abstract, and checked with ordinary types. Right now I'm definitely preferring catamorphisms to patterns. (3/3)
7 replies 0 retweets 22 likesShow this thread
But catamorphism has the same problem. Have you looked at some of the ways to deal with the expression problem?
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.