blog/stack-safety-for-free/
Opened this issue · 2 comments
utterances-bot commented
Stack-safety for free? - @hurryabit’s blog
I demonstrate how to (ab)use generators to transform any recursive function into an iterative one with nearly zero code changes.
thelastinuit commented
To boldy go where no man has gone before - it's the only thing I can think of by reading this. thanks!!!
yzia2000 commented
Fun read! Btw I implemented something very similar a few years for a custom web assembly compiler used at NUS. https://github.com/sourceror-t4-gt-yz/sourceror/wiki/Proper-Tail-Calls It was an incredibly fun project! Can totally understand the thrill and the eureka moment!