3 ms·
I think a separate effect system would be needless specialisation. The IO monad has shown that effects can be reasonably well encoded in the existing type syste
by aninhumer 13y ago
I think a separate effect system would be needless specialisation. The IO monad has shown that effects can be reasonably well encoded in the existing type system, the problem is just that composing lots of effects starts to get complicated. I think any solution should involve extending the type system in a general way, or even just providing some kind of syntactic sugar to hide the noise from more complicated types.
- ghswa 13y agoFor Haskell you're absolutely right however I was responding to the OPs comment that controlling effects in general is over the top. The issue of composing effects, along with the widespread fear of monads, are enough for me to conclude that monads are not the best way to control effects. I don't remember ever seeing any solutions other than monads and deprecate effect systems, hence my preference for the later.
- aninhumer 13y agoThe progress that has been made in Haskell in the past decade leads me to believe that the issues with the current system can be solved with better abstractions, and possibly new syntax. Or if the solution isn't possible in Haskell, that it will be born of a similar philosophy. I don't yet know whether fear of monads is something the programming community will grow out of, or whether there is a more fundamental reason people have difficulty with them. From what I've seen, the response of most people on finally "getting" monads is "Wait that's it?", so I'm inclined to believe a significant part of the hurdle is the fear itself.