3 ms·
What do you mean, you mean typical JavaScript code doesn’t use recursion? Because I can assure you that as someone who works mostly in FP languages, recursion
by stingraycharles 4y ago
What do you mean, you mean typical JavaScript code doesn’t use recursion?
Because I can assure you that as someone who works mostly in FP languages, recursion is, in fact, done a lot with code and not just nethack. :)
- pgorczak 4y agoI think GP means it’s “I recur, he/she recurs” rather than “I recurse, he/she recurses”
- discardable_dan 4y agoWhen an incurrence of debt occurs, we say that someone incurs it. Similarly, English demands that for a recurrence relation (the source of recursion schemes and basis of the term "recursion"), we recur. "Recurse" is a backronym adopted by people who were ignorant about english, math, or possibly both. And now it's become a part of literal coder camp names.
- stingraycharles 4y agoOhh thanks for explaining this. I totally missed this was a grammatical correction. I’m not a native speaker, and I actually learned something from it. So how should I say “this code is recursing” instead? “This code is ..” ? Or is it solely about the form of “This code recurses”, which should instead be “This code recurs” ? Which also sounds somewhat wrong, because wouldn’t that refer to “recurring” instead of “recursing” ? Thanks for your explanation, and of course the grandparent as well.
- dmurray 4y ago"This code recurs" or "this code is recursive". "This code is recurring" is correct, but not so idiomatic. But English is a living language, grammarians should be descriptive not prescriptive etc... "Recurse" (and "Recursing") is a perfectly good backformation, especially because it performs a useful function in distinguishing between two uses of the overloaded verb "to recur".