4 ms·
This can be worked around using trampolines.
by zeckalpha 4y ago
This can be worked around using trampolines.
- ughitsaaron 4y agoThis is the first time I've heard of "trampolines". How interesting. Do you use this strategy for implementing recursion? Are there consequences or trade offs? For others who are curious, see 1) https://stackoverflow.com/questions/25228871/how-to-understand-trampoline-in-javascript https://stackoverflow.com/questions/25228871/how-to-understa..., and 2) https://raganwald.com/2013/03/28/trampolines-in-javascript.html https://raganwald.com/2013/03/28/trampolines-in-javascript.h...
- zeckalpha 4y agoYou would do this inside a transpiler, rather than manually.
- soegaard 4y agoCheck "Using ParentheC to Transform Scheme Programs to C or How to Write Interesting Recursive Programs in a Spartan Host (Program Counter)" for more about trampolines. It's not the only strategy though. https://stackoverflow.com/q/6003037/23567 https://stackoverflow.com/q/6003037/23567