Conversation

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
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
I'll see if I can dig some up. As horrific as this sounds, think: "generalised exception handling". Effects are treated as things that you 'throw' and are handled somewhere else, potentially throwing new effects. All tracked in the type system.
2
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