3 ms·
> Recursion and inheritance are interchangeable (in fact, either can be implemented as syntax sugar over the other) Did you mean Recursion and Iteration? Some
by funny_falcon 5y ago
> Recursion and inheritance are interchangeable (in fact, either can be implemented as syntax sugar over the other)
Did you mean Recursion and Iteration?
Some recursion could be translated into iteration only if there is stack managed by hands. It decreases readability significantly.
Simplest example: Ackermann function.
And it works both way: some algorithms are better read as iteration.