3 ms·
On the flipside, Haskell just got pattern synonyms[1] which are incredibly useful for being able to refactor and work with abstract types. It also has view pat
by tikhonj 11y ago
On the flipside, Haskell just got pattern synonyms[1] which are incredibly useful for being able to refactor and work with abstract types.
It also has view patterns which are quite useful. I don't know how to replicate that in OCaml.
Combining the two lets types expose fairly sophisticated interfaces as normal patterns, which is incredibly useful for things like graphs.
[1]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#pattern-synonyms https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...