[plt-scheme] Perplexed Programmers

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Thu Aug 30 23:09:55 EDT 2007

> To my surprise Monday, first day of the semester, a group of complete  
> novice programmers understood recursion.
> 
> Tell this to your resistors:  Recursion is easier to understand if  
> you are young, or young at heart, if closing your eyes and just  
> "using the force" feels natural.  Recursion is hard if a person  
> thinks it is hard and then works too hard on expansions.

I don't think this is the issue. Recursion is hard to understand when 
one is programming in Java, C++, or the like, because one has to 
understand a stack model (or equivalent). That's why it's traditionally 
a CS 2 topic and struggled with even then. In a purely functional subset 
of Scheme, with a substitution model, recursion is easy to understand -- 
easier than loops in an imperative language. Marco's colleagues were 
remembering their own difficulties with recursion and those of students 
they had taught in a classic CS 2 mode. I've had this problem with my 
colleagues as well. One has to read through the appropriate chapter of 
HtDP, or better yet, teach out of it, before one entirely believes 
otherwise. --PR


Posted on the users mailing list.