Re:Ask HN: Is Recursion Worth It?
by 082349872349872 on Friday January 27, 2023 @01:06AM
(#34543104)
CS departments come in two flavours: systems and theory. The more dogmatic of each both eschew recursion, but have motivations that are diametrically opposed. :)
[ Parent
| on HN ]
Re:Ask HN: Is Recursion Worth It?
by mrnonchalant on Friday January 27, 2023 @01:29AM
(#34543249)
What are the reasons?
Re:Ask HN: Is Recursion Worth It?
by 082349872349872 on Friday January 27, 2023 @01:43AM
(#34543323)
As given above: in a dogmatic systems department, recursion is to be avoided because its naive implementations use more machine resources than their equivalent loops; in a dogmatic theory department recursion is to be avoided because it is more difficult to prove properties of potentially unstructured recursions than of structured folds.
The dogmatic systems department wishes to replace recursion with something more concrete; the dogmatic theory department with something more abstract.
we can form a committee from both departments, and after enough iteration, they may agree to a compromise that annoys everyone equally: replacing recursion with recursion.