hurryabit/hurryabit.github.io

blog/stack-safety-for-free/

Opened this issue · 2 comments

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.

https://hurryabit.github.io/blog/stack-safety-for-free/

To boldy go where no man has gone before - it's the only thing I can think of by reading this. thanks!!!

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!