Re:Algebraic Effects for the Rest of Us
by danabramov on Wednesday July 24, 2019 @01:39PM
(#20517588)
I tried to address this in the article but I guess people skipped over this?
>Note, however, that algebraic effects are much more flexible than try / catch, and recoverable errors are just one of many possible use cases. I started with it only because I found it easiest to wrap my mind around it.
Re:Algebraic Effects for the Rest of Us
by kazinator on Wednesday July 24, 2019 @07:39PM
(#20521234)
Algebraic effects are synchronous; they can't be a generalization of async anything, because that uses threads.
A generalization has to do everything that the specialization does, like dispatch on multiple processors.
The synchronous version of async/await is delay/force; that is just macrology over some lambdas.
From that perspective, algebraic effects make sense and look very interesting.
[1] https://github.com/ocamllabs/ocaml-effects-tutorial