[prog] functions

cristofd at hevanet.com cristofd at hevanet.com
Tue Jan 13 02:06:20 EST 2004


> not really correct: iteration -> doing some thing again and again, 
trough 
> a for loop or through calling itself
> 
> recursion is repeating something and doing something with the function
> afterwards. 
> 
> actually, a better discussion about this subject is found in Structure 
and
> Interpretation of Computer programms, by Abelson & Sussman, you can 
find
> it online but I don't have the link here.

In the original question it's clear that the "recursion" and "iteration" 
wolf is asking about are two different ways to get things done, and C++ 
is mentioned. Given that context, my answer was correct. The words 
"iterative" and "recursive" (though not "iteration") are used with a 
different meaning in SICP; there they are used to distinguish between 
processes whose memory  usage does and does not change over time. Partly 
this is because that book uses the Scheme language, which only allows 
recursion (in the sense I used above), so the words are not needed for 
making that distinction and can therefore be put to another use. Also, 
SICP has a more theoretical focus. In sum: the words have several 
meanings but the context strongly suggests the ones I
g



More information about the Programming mailing list