The short answer is, algebraic effects allow you to build your own abstractions like async/await. That's extremely powerful.
Effect handlers are a foundation of all non-local control flow abstractions. Anything that requires fancy control-flow can be implemented with effect handlers. This includes green threads, async/await, generators (or iterators as some languages call it), but also higher-level applications such as algorithmic differentiation, probabilistic programming, model checking and fuzzing of parallel programs, etc.
A few of these applications were discovered only very recently. The aim is that this language primitive will inspire further discoveries for expressing useful abstractions elegantly.
Some of these ideas are summarised in this talk: https://m.youtube.com/watch?v=VEhkhxoGJSk
Re:PR to Merge Multicore OCaml
by classified on Tuesday December 21, 2021 @03:55PM
(#29641997)
I skimmed through some preprint on arxiv, and I got the impression that one could implement async/await as well as something like green threads if you select a suitable runtime. But beyond implementing other concurrency abstractions, why should I care?