3 ms·
> For a great example of this, see OCaml 5 support for effect handlers. It's basically a generalisation of exceptions, very lightweight and elegant. A similar
by mbo 4y ago
> For a great example of this, see OCaml 5 support for effect handlers. It's basically a generalisation of exceptions, very lightweight and elegant.
A similar approach is being explored for Scala 3:
- https://dotty.epfl.ch/docs/reference/experimental/canthrow.html https://dotty.epfl.ch/docs/reference/experimental/canthrow.h...
- https://infoscience.epfl.ch/record/290885 https://infoscience.epfl.ch/record/290885
- https://github.com/lampepfl/monadic-reflection https://github.com/lampepfl/monadic-reflection (https://youtu.be/UmO-f0qTRSU https://youtu.be/UmO-f0qTRSU)