Hi, sorry if this has been talked about in the stream, but I'm quite behind in the episodes.
Some years ago, I had a course of intro to programming in C, where we had to do an assignment without using iteration, in order to practice another skill we had been taught. It just ocurred to me that I could do what I wanted by calling main() withing itself, something which we hadn't covered in the classes. So later, the teacher assistant told me that using recursion was a very dangerous thing, because you could burn your RAM by using it. The reason for that, he explained in sort of simple terms as we were just starting to program, with no prior knowledge, but he basically said that you piled up the function lots of times in memory, and then when the loop breaks, it very rapidly goes through all of the functions, and it can heat up and burn the memory.
So, my question is, firstly, can your really burn your memory by using recursion?
And, most importantly, is there ever any reason to use recursion over iteration? Does it have any uses that can only be done by using recursion? Again, sorry if this has been covered in stream, but my schedule isn't currently allowing me to catch up...
thanks!