
80: “Lists and loops”, with special guest Nick Lockwood
Swift by Sundell
00:00
Stack Overflows in Recursive Programming
With recursion, your loop counting and everything is being pushed onto the stack rather than being something that you're writing explicitly. You still have to consider it in terms of performance and also in memory usage. I ran into a problem with shape script actually. It uses a data structure called binary space partition, which is basically a kind of tree. And then pretty much any operation I tried to do on that tree was overflowing the stack.
Transcript
Play full episode