[racket] style: nested cond (fine!)

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Feb 21 11:40:50 EST 2012

On Feb 21, 2012, at 11:32 AM, Stephen Bloch wrote:

> On Feb 21, 2012, at 11:15 AM, Matthias Felleisen wrote:
>> If they were to write this code in Java ('CS2'), they wouldn't have conds for the outer part -- they'd use dispatch.
> Only if they were using polymorphic data structures.  But most of the Real World uses null-terminated data structures instead, despite that approach's practical disadvantages, so students need to learn how to work with them too -- and CS2 seems like an appropriate place to do that.  So yes, they WOULD have a conditional for the outer part.

You are right. We must teach students how to be bad OO programmers in CS2. Where else would they learn it? Plus they pay us for it. 

Posted on the users mailing list.