Effect Handlers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Effect Handlers

Eliot Miranda-2
Hi All,

    I found this write up instructive and well-written:

_,,,^..^,,,_ (phone)


Reply | Threaded
Open this post in threaded view
|

Re: Effect Handlers

Frank Shearar-3
On Fri, 26 Oct 2018 at 07:20, Eliot Miranda <[hidden email]> wrote:

Daan Leijen's done some interesting work in the area, to the extent of having built a language that implements his research area (see https://github.com/koka-lang/koka and https://www.microsoft.com/en-us/research/project/koka/?from=http%3A%2F%2Fresearch.microsoft.com%2Fen-us%2Fprojects%2Fkoka). He's implemented effects handling in C, too (https://www.microsoft.com/en-us/research/publication/implementing-algebraic-effects-c/).

Matija Pretnar wrote a decent introduction to the concept: https://www.eff-lang.org/handlers-tutorial.pdf.

The what's-in-it-for-me of effects handling is that it supplies, in a single tool/abstraction/structure, something that you can use to implement asynchrony (all the async/await stuff being added to languages), exception handling, iterators, and so on. (If this sounds a lot like continuations, that's because they're related!)

frank 


Reply | Threaded
Open this post in threaded view
|

Re: Effect Handlers

Tony Garnock-Jones-5
On 10/29/2018 07:51 PM, Frank Shearar wrote:
> The what's-in-it-for-me of effects handling is that it supplies, in a
> single tool/abstraction/structure, something that you can use to
> implement asynchrony (all the async/await stuff being added to
> languages), exception handling, iterators, and so on. (If this sounds a
> lot like continuations, that's because they're related!)

I'd imagine an effects library would be a fairly thin layer atop
Squeak's exceptions, given that they already separate the handling from
the decision to abort or resume!

That is to say, many non-aborting uses of Squeak's exceptions already
has the feel of an effects system.

Cheers,
  Tony

PS. I implemented effects in Racket using its delimited continuations a
few years ago:
https://github.com/tonyg/racket-effects/blob/master/effects/main.rkt.
It's quite possible a Squeak implementation could exploit OO techniques
to make a very pleasant effects library.