If you understand Continuation Passing Style, you're not in Callback Hell anymore, just in yet another Overly-Low-Level-Syntax Purgatorium—with a bit more scorn towards metaprogramming deniers—and your automatic indentation mode disabled.
-
Show this thread
-
OK, it *is* somewhat hellish when all the APIs in a programming language are in CPS, but the implementers purposefully refuse to support proper tail calls. Now you're going to leak stack space, and/or implement your own trampolining system and adapters. Damn Continuation deniers!
1 reply 0 retweets 5 likesShow this thread -
Replying to @Ngnghm
Is this subtweeting that trampoline() tweet that's doing the rounds? Because even if it isn't, my headcanon will be that it is
1 reply 0 retweets 1 like -
Replying to @leastfixedpoint
No, it wasn't, but if you link said tweet below, it might retroactively become so.
1 reply 0 retweets 0 likes -
Replying to @Ngnghm
Tony Garnock-Jones Retweeted Marc Grabanski ✌️
Tony Garnock-Jones added,
1 reply 0 retweets 1 like
Thanks. Interestingly, to reliably bridge CPS functions into the trampoline, you have the initial/final continuation register a trampoline function. But continuations are not linear and may return more than once, so your register is a deque and you get green threading for free.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!
Thanks