21 ms·
Effect systems are both a runtime thing (similar to exceptions or lisp's conditions, in some sense), and a type-level thing (have a set of effects attached to a
by c-cube 5y ago
Effect systems are both a runtime thing (similar to exceptions or lisp's conditions, in some sense), and a type-level thing (have a set of effects attached to an arrow, with type inference that is able to infer the effects and compose them nicely). Both are necessary for the future ML™, I think: the runtime part gives semantics to effects and composes super well (better than monad transformers, afaict: no need to `lift` everything); the typing part keeps the code honest. The effects also have to compose nicely with higher-order functions (so that `map` carries over the effects of its functional parameter).
> From what I read recently that's the plan, although they'll focus first on domains for 5.0, and merge the effects later.
Yes indeed! The timeline for typed effects is not clear to me, it might take a long time, especially with the stringent constraints of backward compatibility.
That said I'm not an expert, I'm just very hyped :-)
- Zababa 5y agoThank you for the explanation! I feel like I understand this better now. > The timeline for typed effects is not clear to me, it might take a long time, especially with the stringent constraints of backward compatibility. From what I understand, the "long time" will be probably less than modular implicits, which are estimated at at least a few years away. There are a few informations here https://discuss.ocaml.org/t/multicore-ocaml-may-2021/7990 https://discuss.ocaml.org/t/multicore-ocaml-may-2021/7990 and here https://discuss.ocaml.org/t/multicore-ocaml-june-2021/8134 https://discuss.ocaml.org/t/multicore-ocaml-june-2021/8134, where at least we can see that the effect branch is up to date with 4.12. The performance seems really good, I can't find it anymore but they had the same performance as Go's net/http with http/af. It's a very exciting space!