4 ms·
Is there an ELI5 writeup somewhere about what's so nice about algebraic effects? I skimmed through some preprint on arxiv, and I got the impression that one co
by jabl 5y ago
Is there an ELI5 writeup somewhere about what's so nice about algebraic effects?
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?
- yawaramin 5y agoCheck out https://overreacted.io/algebraic-effects-for-the-rest-of-us/ https://overreacted.io/algebraic-effects-for-the-rest-of-us/
- simplify 5y agoThe short answer is, algebraic effects allow you to build your own abstractions like async/await. That's extremely powerful.
- classified 5y agohttps://speakerdeck.com/kayceesrk/effect-handlers-in-multicore-ocaml https://speakerdeck.com/kayceesrk/effect-handlers-in-multico...
- kcsrk 5y agoEffect 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 https://m.youtube.com/watch?v=VEhkhxoGJSk