5 ms·
> Bad CS teacher. You don't know. Maybe she wants them to recognize and use folds whenever possible, rather than using low level recursion all the time. You k
by lahvak 4y ago
> Bad CS teacher.
You don't know. Maybe she wants them to recognize and use folds whenever possible, rather than using low level recursion all the time. You know what they say: "Someone has to write recursive functions, but it does not have to be you!"
- 082349872349872 4y agoCS departments come in two flavours: systems and theory. The more dogmatic of each both eschew recursion, but have motivations that are diametrically opposed. :)
- mrnonchalant 4y agoWhat are the reasons?
- 082349872349872 4y agoAs 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.
- kerpotgh 4y ago[dead]