3 ms·
We need algebraic effects in more languages, this solves the function coloring problem. OCaml 5 has them and it seems to be doing quite well, combine that with
by satvikpendem 5mo ago
We need algebraic effects in more languages, this solves the function coloring problem. OCaml 5 has them and it seems to be doing quite well, combine that with the semantics of the borrow checker in the form of OxCaml and we might just have an ideal language. I'd like to see algebraic effects in Rust as well but sadly it seems their keyword generics initiative is languishing.
Related, one of the former React maintainers wrote a primer on algebraic effects that's a good read: https://overreacted.io/algebraic-effects-for-the-rest-of-us/ https://overreacted.io/algebraic-effects-for-the-rest-of-us/
- zokier 5mo agoI don't think effects alone solve function coloring problem, in worst case they make it worse because every library can have its own colors
- wtetzner 5mo agoEffects solve it in the sense that the caller can handle the effects to work however they like, making the functions that use the effects more reusable. E.g., if you install IO handlers that are async and call a function that does IO, it's now an async function.