(no title)
millstone | 5 years ago
Strings are a good illustration. Instead of an abstract polymorphic String type, Haskell provided a concrete String type as an ADT. This proved too inflexible, which is why we have Text, lazy Text, ShortText, etc. Compare to NSString which also has multiple representations but hides them behind a single polymorphic interface.
weavejester|5 years ago
ADTs are not an intrinsic part of FP, as not all FP languages even have them.
I'd also question whether ubiquitous polymorphism is overall a good thing in a language, or whether it's misguided complexity. In most OOP languages, any public method can be polymorphic, but a polymorphic function is inherently less predictable than one dispatches off a single type.
jose_zap|5 years ago
Polymorphism is front an central to everything in Haskell, which is why your comment sound off to me.
javcasas|5 years ago
millstone|5 years ago