Message from JavaScript talks

April 2017

— But surely is one of the best ways to get over call stack size limits


Any recursive function can be converted to be made metacompositional, so it doesn't make a function call to itself, but can still re-run itself

— The tradeoff is it's hard to read and understand

— Takes advantage of labels, loops, and continue, but state management explodes

— Wow, I haven't seen a single use for the labels.

— It's the first time I even saw them, but apparently the inventor of Fortran came up with some functional programming idea where you can use them to write recursive functions without recursing

Message permanent page

— The best part is, it supposedly works on any recursive function under the sun, and is faster in JS due to not having to manage a call stack

Message permanent page

— While you do have to manage state a lot more between "recursions", essentially you wrap the whole thing in a loop, then when you want to recurse you save state, then run continue myLoop;

Message permanent page

— Implementing a stack to save state into is best because it then emulates the behavior of a real call stack

Message permanent page

— Without the RangeError :p

— Wow

— Fuck