[plt-scheme] dots

From: Richard Cobbe (cobbe at ccs.neu.edu)
Date: Mon Jun 11 15:55:15 EDT 2007

On Mon, Jun 11, 2007 at 09:46:33PM +0200, Hans Oesterholt-Dijkema wrote:
>  Of course, well, ':' would also be ok?

Looks like it, yes:

    Welcome to MzScheme v370.2 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
    > (: 3 4)
    reference to undefined identifier: :

The error message indicates that the reader's OK with this; you just have
to provide the right definition for ":".  With ".", though, the error
message comes from the reader:

    > (. 3)
    stdin::1: read: illegal use of "."
    > 3
    > stdin::4: read: unexpected ')'

(The last two lines are also printed by MzScheme, despite the appearance of
the prompt.)

You can also escape the dot, a possibility that I didn't consider:

    > (\. 3)
    reference to undefined identifier: |.|

But I suspect most people would reject that on aesthetic grounds.  I would.

Richard


Posted on the users mailing list.