codemancers / sicp

another attempt at sicp book
https://github.com/code-mancers/sicp
3 stars 0 forks source link

1.2 Procedures and the Processes They Generate #5

Open goromlagche opened 9 years ago

goromlagche commented 9 years ago

Discussion: https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html

goromlagche commented 9 years ago
One reason that the distinction between process and procedure may be confusing is 
that most  implementations of common languages (including Ada, Pascal, and C) 
are designed in such a way that the interpretation of any recursive procedure consumes 
an amount of memory that grows with the number of procedure calls, even when the 
process described is, in principle, iterative. As a consequence, these languages can 
describe iterative processes only by resorting to special-purpose looping constructs
such as do, repeat, until, for, and while. 

Had a doubt that why C can't do this, found an answer here