3 ms·
I've heard this a lot about generic effect systems. Do you have any good resources on OCaml5 effect handlers I can follow? I dabble in type theory but prefer mo
by elcritch 4y ago
I've heard this a lot about generic effect systems. Do you have any good resources on OCaml5 effect handlers I can follow? I dabble in type theory but prefer more pragmatic aspects. I sorta get the OCaml 5 examples I've read but don't know how it works into a generic effect system.
For example, Nim has an effect system (of sorts) and I've been curious what the leap to "generalisation of exceptions" would look like for a systems language. It does feel to me like error's and async's both should remain orthogonal to most functions but we haven't had a good theory for it. What are the missing pieces and what have the OCaml5 folks been up to?!
- grumpyprole 4y ago> Do you have any good resources on OCaml5 effect handlers I can follow? I encourage you to have a look at the published paper, it's an easy read and covers the motivation and examples: https://arxiv.org/abs/2104.00250 https://arxiv.org/abs/2104.00250 Here's an excellent talk that walks through modifying a non-trivial code base for concurrency using effect handlers: https://youtu.be/k3oQwpyXmpo https://youtu.be/k3oQwpyXmpo > It does feel to me like error's and async's both should remain orthogonal They aren't completely orthogonal though, as both are effects. Haskell and Rust model both with Monads. OCaml 5 can model both with effect handlers. It is desirable to track the difference in types, this is something I hope the OCaml folks will add in the future.