Code structure

Why is recursion the most dangerous code structure?

Attached: cover.jpg (640x512, 51.54K)

It is not the most dangerous code structure. But it does carry the risk of stack poping

Indirect recursion is.

Attached: pooh_recursion.gif (506x516, 3.52M)

You can blow out a stack frame in some languages. But it's really no different from the risk of getting stuck in an infinite loop.

The same reason as using regex expressions (bad not dangerous), developers.

*tail call eliminates in your path*

Attached: E89D24C9-8128-456F-A991-8D1776E1E6B6.png (1200x847, 15.43K)

>regular expressions expressions

I'm a Haskellfag but I recognize that most recursive algorithms are better off implemented with an explicit stack in a loop ina language like C++

>tfw too stupid to implement RPN calculator with 4 basic math operations using recursion
I am NEVER going to make it, am I?

Yes Sir I am clojure developer 4 months experience.

It's only dangerous if you don't know what you're doing.
I'm writing this post recursively, and as you can see I'm fiSegmentation fault

I loved doing recursive shit with Haskell and seeing all my classmates struggle with it.

I love recursion!

You run out of memory quickly. The only recursion that's optimal is tail recursion, but at that point you might as well just write a for loop.

How?

see

If you don't have tail recursion optimization than it can grow out the stack and cause a stack overflow in memory. Also you have to be wise about your break condition and it tends to he harder to measure than something that is iterative.

It's good for stuff sometimes where you don't know how many iterations it's going to take to get to the end, but you are pretty sure there is an end (which can obviously be expressed iteratively, but not always straightforwardly).

impressive
very nice

Man Any Forums is just impressively retarded