Hello, I’ve been rather interested in effect systems for months at this point and I’ve been researching their benefits and issues. I do know that their benefits include:
- Potentially being faster than traditional MTL (put a pin on this, I’lll come back to it later…)
- Being easier to write & read (?)
- They compose nicer than monads (could be a subpoint of 2?)
I might’ve missed some other potential benefits with effect systems, so I’d love to hear about them if you have any in mind.
But while their potential benefits stem from theory, it seems their issues are what the real world answers to these theories:
- In reality, implementations could be way faster than they are right now (eff, polysemy, eveff, speff, mpeff)… They all seem to use different implementations and papers to back their implementation. I think polysemy is Free-monad based, and it was determined that it’s too inefficient (why? could that problem be fixed so that Free-monad based implementations gain speedups?). Eff uses delimited continuations but is waiting for some primops to be merged to gain speedups, but people say that they won’t improve the performance much. eveff/speff/mpeff seem to use a new paper to implement effects that seems really weird
- In some cases, they’re more complex than required. I mean, things like effectful and cleff are really simple to use; but something like Polysemy that uses Yo and Stategies seems way more complex. People seem to prefer just using IO with IORefs and whatnot over effect systems because of these two issues. I wonder if that’s actually a good replacement? Some people also dislike the fact that some implementations use delimited continuations saying that delimited continuations allow too much or something… but that complaint doesn’t make sense to me.
I also might’ve missed some other potential issues here, so again, I’d love to hear them!
One more thing though, people kept pointing me to the lexi vod to sum up the issues with effect systems… I can’t watch it though, it seems twitch has really bad availability to me which causes it to buffer constantly. But my personal opinion is that twitch vods aren’t really the most neat way to organise these thoughts, and I wonder if anyone jotted them down, for ease of viewing.
There’s obviously the traditional libraries like free-er, freer-simple, fused-effects… but they seem to have been overruled by the aforementioned effects libraries. I don’t know what benefits or issues those have, or whether they’re actually good alternatives to the aforementioned libraries.
I’d like people’s opinions about effect systems in general (and their favorite effect system!) and if they think they’re actually useful and the details of the performance problems and why they’re like this as well as if you guys know of theoretical ways to fix them. I’m also interested in people’s opinions about their complexity and if they think they could be simplified to a point where using them would be more easy. Specifically I’d really like people to discuss in detail everything I said in the points in benefits/issues as well. Thank you very much for your time.