Algebraic Effects #32
MelbourneDeveloper
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Algebraic effects are the beez kneez of abstractions. Osprey is close to having algebraic effects with compile time handler safety. Osprey doesn't currently allow dynamic effects, but it will allow a dynamic approach to affect handling where the potential for missing handlers will return a result type. The focus is on compile time safety and zero cost abstraction. Osprey's approach to algebraic effects mean that you don't pay a performance price for using them, and you don't run the risk of runtime errors unless you explicitly need dynamic handlers. We will probably use a precompiler to allow switching between handlers at build time.
Some light reading:
https://arxiv.org/pdf/1312.1399
https://arxiv.org/pdf/1807.05923
https://www.inner-product.com/posts/direct-style-effects/
https://www.eff-lang.org/handlers-tutorial.pdf
https://en.wikipedia.org/wiki/Effect_system
https://dl.acm.org/doi/pdf/10.1145/3290319
Branch here:
https://github.com/MelbourneDeveloper/osprey/tree/algebraicfx3
Beta Was this translation helpful? Give feedback.
All reactions