Conversation
I wanted algebraic effects and handlers. Instead all I got was DI. 🤪
1
2
Effects and handlers allow you to do similar stuff to DI (actually quite similar to aspect-oriented programming). They are pretty much accepted as a given in most PL conferences these days - but still need some stuff to be figured out. So at least we have this nice crate!
1
1
Need good, guaranteed fusion of handlers like iterators enjoy in Rust before they are viable for a Rust-like language. The future is exciting though!
1
do you have good examples of this? I have to admit I’m not familiar with effects and handlers, although I’ve noticed recently more and more haskell devs talk about effects
1
1
Do you have examples of those effects/handlers in Rustt for beginners ?
1
They aren't part of Rust at the moment, and there are no plans to add them as of yet, so it was somewhat mean of me to jokingly bring it up. Here is an interesting slideshow regarding multicore OCaml's upcoming effects and handlers though: kcsrk.info/slides/handler
1
1
There are some links to languages that have them and some scholarly articles here: github.com/andrejbauer/ef (don't feel bad though if the papers are a bit impenetrable though).
The effect rosetta stone is also interesting - shows the same programs written in different effect systems: github.com/effect-handler
1
As I alluded to before, it's still an area of active research (well, much of PL stuff is), and effect systems are currently not without their drawbacks, some of which make it hard to add to a language with the performance demands of Rust. I hope that can be figured out though!
1
Show replies


