@KitRedgrave async / await makes this a bit better in javascript
BUT STILL
the right answer is to have coroutines (ideally by delimited continuations) in a way that's much more cleanly baked into the language
Racket / Guile do this in a sane way. async stuff can be made completely clean and look like everyday straightahead coding.
Every time I program in javascript I get so angry because of this.
async stuff, js musing Show more
@cwebber @KitRedgrave I love Simon Tatham's "Coroutines in C", have you seen that?
https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
It's so delightfully horrifying, and made even better/worse by the follow-up:
https://www.chiark.greenend.org.uk/~sgtatham/mp/
Anyway there are an amazing variety of ways to do this kind of thing in many languages and I love them all and want everybody to see them ๐