Message from JavaScript talks

April 2017

— It is specifically tail recursion, not just a tail call


His code is kind of like a transpiler that unrolls loops/recursions by literally repeating code, though

— I don't think so since the examples on github seem to wrap stuff in a while(true)

— Yeah that's it

— Can't do while (true) { somethingAsync(); }

— Although if that conditional can be filled in, you may not need metacomposition

— I think iterative approach should be considered before metacomposition, but its cool still

— Kind of like a goto

— Async await solves this anyways

— While (true) {
await someNetworkStuff();

— Ah well, the problem is call stack size

— Yeah but that's exactly what tail call optimization is and the reason it only works on recursion with tail calls :)

Message permanent page