2 ms·
Recursion is absolutely easier to understand, period. A big reason for using it is that it's easier to convince ourselves that a recursive solution is correct;
by kazinator 7y ago
Recursion is absolutely easier to understand, period. A big reason for using it is that it's easier to convince ourselves that a recursive solution is correct; it directly gives us the pieces that we need for inductive reasoning. The degree to which a module of code is hard to understand is directly related to the effort required to convince ourselves that it does exactly what it is supposed to, in all cases.
Recursive solutions are hard to come up with for someone whose perspective is biased due to having a background in writing imperative code with iteration. They have already forgotten the difficulties they overcame in acquiring their existing skills.
Someone who learned nothing but recursion (and pure functional programming) will likely struggle with loops, gotos and assignments.