Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are Extensible Effects going to displace Monad Transformers. Oleg argues they are clearly superior.


Any good resources on extensible effects? I'm currently reading:

http://okmij.org/ftp/Haskell/extensible/index.html

I also know of:

http://jozefg.bitbucket.org/posts/2014-07-15-reading-extensi...

However I was wondering if there was a "Gentle introduction to extensible effects".

Edit: I found this presentation: http://ro-che.info/docs/2014-06-14-extensible-effects.html#1...


It's worth looking at the Eff language, which is an OCaml variant. Much easier to understand, especially if you're monadically challenged. This paper is a great introduction to the idea of algebraic effects:

http://math.andrej.com/2012/03/08/programming-with-algebraic...

Shameless plug, I gave a talk about this at the NYC "Papers We Love" meetup. Audio & slides can be found here: http://www.mixcloud.com/paperswelove/bbloom_3_17_2014_progra...


I read the Eff paper, and I was blown away. I find monad transformers to be extremely clunky in comparison. The mental tax of Eff seems a lot smaller.


All formulations I know of are slow right now since there always has to be some kind of clunky search mechanism through the handlers at runtime. That may be fixed at some point.

In the mean time , mtl is almost extensible effects and is very fast.


Can someone give an elevator pitch of extensible effects? Monad transformers are very useful and rather easy once you get used to them, although not without their downsides. What advantages do extensible effects have?


Extensible effects are easier to compose in arbitrary ways. If you have a monad transformer stack you can only have each type of transformer once in each stack before you have to start using lift . lift . lift to get to the inner layers as the type class functions will only get you to the outermost instance.

They suffer from performance problems though as Roman discovered at ZuriHac this year: http://ro-che.info/articles/2014-06-14-extensible-effects-fa...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: