[plt-scheme] HtDP: 'Function' or 'Program' or 'Method'?

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Wed Nov 26 17:15:17 EST 2008

Matthias wrote:

> Functions for individual things at the beginning. We remind them of  
> the mathematical functions they got to know and hate in boring  
> algebra and precalc courses.
> As they write several functions to solve problems, we start mingling  
> functions and programs.

But you never call a single function definition a "program", right?

The grammars for the teaching languages make it clear that a program is 
a sequence of definitions and expressions. In assignments in our first 
course, I always say "write a function", but use "write a program" in 
the second course when we are having them do explicit I/O with file 
redirection on the command line.

I never use the word "method", because those who have learned Java or 
some other such language need to get it out of their heads long enough 
to actually learn the HtDP material. --PR

Posted on the users mailing list.