[racket] [plai] consistent output

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Sun Nov 20 10:16:06 EST 2011

>>> (foo 1)
>> (foo 1)
>>> (list 1 2)
>> '(1 2)
>> 
>> The output is not really consistent, in that foo is printed as a (user-level) 
>> constructor, but list is not. 
> 
> Well, `quote' is playing the role of constructor.

sure -- I get it, but it's surprising at first for students. At least it calls for an explanation.

> 
>> For teaching, the problem with output '(1 2) is 
>> the need to explain (or try to ignore) the quote.
> 
> PLAI uses `quote' for lists starting on page 8, so if you're teaching
> with the book, it may not be worthwhile to avoid `quote'.

Strictly speaking, it's not. It says "we can use the quote notation to simulate read."
In the book, `read' comes with the need to start parsing. In my case, I have to start with 2 weeks of intro to Scheme before entering into PLAI (Scheme basics, higher-order programming, recursive definitions, design recipe). 2 weeks where I technically don't need `read' (or `quote') at all.

Anyway, I agree this is not a big issue, I have dealt with it since plai's behavior changed, a few semesters ago. It's just now that I'm writing some lectures notes (with Scribble!) in spanish for the 2-week crash course before PLAI, that I realized that I was missing the good old behavior.

> I think my students has had little trouble with `quote'. In contrast,
> in the bad old days when the `quote' was missing --- so that `(list 1
> 2)' printed as just `(1 2)' --- students had a difficult time with the
> difference between expressions and printed values.

I certainly agree with that.

> [...] Right -- not until we fix constructor-style printing.

Ok ;-)

-- Éric


Posted on the users mailing list.