3 ms·
Is there any kind of task where you could think of the recursive perspective as natural? (If you have a tail-call optimization, many kinds of recursive process
by schoen 3y ago
Is there any kind of task where you could think of the recursive perspective as natural?
(If you have a tail-call optimization, many kinds of recursive process don't require a stack and don't risk an OOM condition!)
- michaelt 3y agoThe traditional task is "doing things with tree data structures"
- gorjusborg 3y agoNot the above commenter, but I think there are so many algorithms that are easier, even beautiful, when written recursively as opposed to iteratively (e.g. tree traversal, language parsing). That doesn't mean its natural for humans to understand.
- deleted 3y ago[deleted]
- hobs 3y agoMany, but I am talking about humans, not computers.
- schoen 3y agoYep, I meant my question as whether there are any typical human tasks that are easy for humans to understand in terms of recursion. I understand that there are lots of algorithmic tasks that are best understood that way, and that those aren't what you were talking about.