4 ms·
Haskell doesn't force anything, but it does make some pretty strong suggestions. Haskell suggests immutable data, pure functions, and algebraic thinking. You ca
by pjscott 7y ago
Haskell doesn't force anything, but it does make some pretty strong suggestions. Haskell suggests immutable data, pure functions, and algebraic thinking. You can make your data mutable, do everything in the `IO` or `State` monad, etc., because Haskell doesn't force structure on your code -- but the suggestion is still there, whispering in the back of your mind.
(This is what I love about Haskell, BTW, so please don't read this as a criticism.)
- fiddlerwoaroof 7y agoThis is what I was thinking: if I just want to sit down and design myself an object system, Haskell’s type system gets in the way of the necessary parts. (Unless you want to limit the interaction between your object system and haskell’s types in annoying ways). I’ve implemented CLOS-style mutimethods as a handful of functions basically translated from the Common Lisp in the art of the meta-object protocol. And the multimethods work transparently with any ja type. This isn’t a criticism of Haskell: there are plenty of benefits to forcing declarative IO and limiting the language (roughly) to features that don’t break type-inference, but those advantages of Haskell make it much less enjoyable to experiment with programming paradigms in.
- tene 7y agoThanks for the clarification!