[racket] style: nested cond (fine!)

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Feb 21 12:02:35 EST 2012

Amen. 


On Feb 21, 2012, at 12:01 PM, Stephen Bloch wrote:

> 
> On Feb 21, 2012, at 11:45 AM, Matthias Felleisen wrote:
> 
>> How can they do that [read and modify code written by bad OO programmers] if we teach them only bad OO programming? 
> 
> I wouldn't suggest that, of course.  The last time I taught CS2 (or rather CS1 in Java, having been expressly forbidden to use any other language), I had students build lists and trees with polymorphism, then do it again with nulls.
> 
> I also had them build a list-of-lista data structure from scratch with a functional API, and use this to solve the "permutations" problem; then I had them do the same problem again using Java's built-in collection classes (which have a very stateful API).  The results were enlightening: almost everybody got it working the functional way, but when we did it using Java collection classes, ONE student in the class turned in a solution that FREQUENTLY (not always) produced correct answers.
> 
> 
> Stephen Bloch
> sbloch at adelphi.edu
> 



Posted on the users mailing list.