4 ms·
Algebraic effects can also potentially abstract all this away and make the runtime pluggable.
by laerus 4y ago
Algebraic effects can also potentially abstract all this away and make the runtime pluggable.
- beanjuiceII 4y agohas haskell made all this pluggable?
- wtetzner 4y agoI don’t believe Haskell has support for algebraic effects. OCaml is getting them though.
- the_duke 4y agoThere are various Haskell effect libraries though. The big difference between effects and monads is that effects compose, while monads always require cumbersome mapping between domains.
- thesz 4y ago"What is language feature in regular programming languages is a library in Haskell" I will continue repeat that. ;) I also wish other languages go the way Haskell goes. There is at least one algebraic effects library in hackage [1]. [1] https://hackage.haskell.org/package/effect-handlers https://hackage.haskell.org/package/effect-handlers
- beanjuiceII 4y agoindeed thanks :)
- wtetzner 4y agoSure, but now your program needs to use this library everywhere, or implement Monad transformers etc. to interoperate with existing code.
- thesz 4y agoI can make my own library, or modify the library given above, or write a wrapper - I have more choice than "use this concrete syntax rule for that kind of things". Moreover, values with effects are first class values, I can pass them, extend them, combine them, in some rare cases inspect them, abstractly interpret them, and last, but not least, evaluate them. Most often than not, this is not the case when they are language feature.