3 ms·
> If you will, think of this as a speculation about a successor language. 15 years from now (say) there will be a better language than Haskell in the statically
by eru 17y ago
> If you will, think of this as a speculation about a successor language. 15 years from now (say) there will be a better language than Haskell in the statically typed lazy functional languages space, which absorbs the key positives of Haskell, has a few new ideas, and possibly treats Monads differently (or does away with them altogether). Clean (the language) deals with IO with uniqueness types with nary a monad in sight. Is that design "better"? Worth thinking about.
Clean's uniqueness types have the distinction that you can e.g. in theory split the state of the world, thread it to two different function and then put it back together, and make the type system ensure safety.
Monads have the distinction that they are not only easy to compose but that composability is baked right into their very definition (and laws).
Functional reactive programming might be a good alternative model for I/O and some other things where monads are used. Also arrows seems to be worth more investigation.
Arrows are in a lot of cases the more apt structure that monads. The reason arrows aren't used more in Haskell already is that the monads have such a nice syntax.