Skip to content

Comment on Reconsidering the way I explain programming (2020)parent

Comments

Have you actually explained it to people that way and had them get it? I think most people would just understand what you described as an iterative process, and understand recur as being no different than repeat.

Iteration (repetition) is a special case of recursion where the recursive action is always the final step in the process; it's a kind of recursion that dispenses with the need to track a stack of process activations. So it's quite possible to teach both in the same context.

Indeed. Recursion requires that a procedure calls (or recurses over) itself.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.