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
Replying to and
So I could define a 'Log' effect with a constructor 'trace'. Then my application code could potentially do logging, but it's up to the top level caller of the application to do something with those thrown effects, potentially logging to standard out, or a file.
1
1
Show replies
Show replies