3 ms·
Because monads allow you to basically embed "Algol" into Haskell. It's super imperative, despite it being interpreted as a pure function. I'd actually go so fa
by tel 13y ago
Because monads allow you to basically embed "Algol" into Haskell. It's super imperative, despite it being interpreted as a pure function.
I'd actually go so far as to say Haskell is quite multi-paradigm but only the FP side comes close enough to Haskell's "purity" as to make a community translation. I'd be quite willing to say that Haskell has a fantastically correct if slightly difficult to use object system.
It just doesn't quack anything at all like Smalltalk or Java's.
- nbouscal 13y agoI strongly disagree, but am sure that that disagreement comes only from us defining terms differently. If you define the term "imperative" widely enough to include Haskell, what language does it not include?
- tel 13y agoI wouldn't claim it excludes many languages. Prolog comes to mind. Imperative, to me, means a language structured over the execution of statements in order. I think that's a fairly common definition.
- nbouscal 13y agoThat still sounds a little weak, but even under that definition, how does Haskell qualify? Do-notation may make things look like statements, but they are still expressions!
- tel 13y agoThey are statements in an embedded language modeled by the monad. The distinction isn't great. Monad allows the implementer to capture linear action if they like. That makes them at least powerful enough to embed Algol.