[Edu-sig] Re: Lisp vs Scheme vs Python

Matthias Felleisen matthias@rice.edu
Sun, 27 May 2001 11:38:51 -0500 (CDT)


Kirby, your teacher understood Lisp and Lisp vs Python very well. 
He didn't understand Scheme and why recursive programming matters. 

Scheme and S-expressions: your teacher was clueless in that regard. 

Scheme, macros and do: 
 You don't need to teach about macros to use looping constructs. 
 You can use the ones that every Scheme provides (do) and introduce new
 ones for your students, if you believe it's best. 

Of course it isn't :-). 

Recursion: 
 Read up on data types and how to specify them. Mathematically 
 speaking (and that's what you want to do), there are 

  basic sets 
  subsets
  unions
  products 
  inductive definitions
  (co-inductive definitions).

 That's it. Your basic functions in a program should match the data defs.
 The only way to match induction is to use recursion. The kind of recursion
 that you know (e.g. quicksort, fractals) has little to do with data. It's
 an algorithmic technique beyond basic programming. 

 Loops are short-hands for linear recursions. But because there is an
 infinite way of doing linear mutual recursions among data defs, you can't
 get away with a finite number of looping constructs -- if you want to match
 data defs and program defs. You need recursion. 

Read HtDP (http://www.htdp.org). 

-- Matthias