I’m not really seeing how sum types solve the expression problem. Functional languages are good at adding new operations to existing types and bad at applying existing operations to new types. How do sum types help functional languages apply existing operations to new types? The classic solution to the expression problem in Haskell, as I understand it, is type classes, not sum types.
4 Likes