[plt-scheme] jumping comma

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Sun Jan 1 19:32:42 EST 2006

On Sat, 31 Dec 2005, Andreas Zwinkau wrote:

> I don't know, what to make out of this behaviour:
>     > '(jumping, comma)
>     (jumping ,comma)
> Why does the comma jump from "right of jumping" to "left of comma"?

Hi Andi,

Others have already shown that the comma is treated as a special case by
the reader function.  By the way, if we do want to have a list whose
content contains what I think you'd like to have, then we can use vertical
bars or backslashes to escape comma-ed symbols:

> (define mylist '(jumping |,comma|))
> (car mylist)
> (cdr mylist)
> (symbol->string (cadr mylist))

Section 11.2.4 of the language manual talks about this a few paragraphs


(By the way, the documentation there still says that the reader will treat
symbols case-insensitively by default; I think the documentation needs to
be updated.  It still reads "By default, symbols are read
case-insensitively (i.e., characters are case-folded) ..." in the
pre-production docs too.

Best of wishes to you!

Posted on the users mailing list.