3 ms·
Maybe I'm missing something, but this just seems like a less general construct than algebraic effects; for instance, see the exn effect in Koka: https://koka-la
by sestep 2y ago
Maybe I'm missing something, but this just seems like a less general construct than algebraic effects; for instance, see the exn effect in Koka: https://koka-lang.github.io/koka/doc/book.html#why-effects https://koka-lang.github.io/koka/doc/book.html#why-effects
Is there some benefit of this approach compared to algebraic effects?
- zokier 2y agoImplementation simplicity?
- sestep 2y agoCould you shed some light on the degree to which it's simpler? I've heard that algebraic effects are complex but I don't have much of a feel for why that is.
- Yoric 2y agoAgreed, it's pretty clearly a subset of algebraic effects. In fact, I'm fairly certain that I've seen examples similar to OP as the hello world of algebraic effects a few times.
- zupa-hu 2y ago(Author here) Yes, that's correct. It's an algebraic effect elevated to a dedicated language feature. The benefit is that it is simpler than having full-blown algebraic effects, both to learn and to actually use. Probably not for you, but for most people, and definitely for the non-professional developer kind.