Subject: Re: hoots n hollers with c2lisp
From: rpw3@rpw3.org (Rob Warnock)
Date: Mon, 16 Jan 2006 03:32:48 -0600
Newsgroups: comp.lang.lisp
Message-ID: <vtWdnb32YJHd9VbeRVn-uA@speakeasy.net>
John Thingstad <john.thingstad@chello.no> wrote:
+---------------
| Rob Warnock <rpw3@rpw3.org> wrote:
| > This is really cool! But... I'd hate to lose the ANSI standard
| > structure-reader readmacro, as in #S(FOO :A 1 :B 2 :C 3).
| > Is there any reason a naked #" isn't better as the community's
| > default read-as-C-string readmacro?
| 
| Well I was going to use #C.
| But that of course conflicts with complex.
| Hence the unused (defvar *complex-delimiter* #\()
| But it seemed overly complicated so I changed it..
| In principle it can be anything you want..
+---------------

Yes, but... It's always best to use something that's not already
defined by the standard.

+---------------
| Missed the use of S.
+---------------

Which is why I have CLHS 2.4.8 "Sharpsign" permanently bookmarked,
for its Figure 2.19 "Standard #Dispatching Macro Character Syntax"!  ;-}

    http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm

Remember that the second character of a dispatching macro character
sequence does *not* have to be a letter. It can be any character at
all except digits or whitespace [or #\<]. Sometimes people get fixated
on the letters when they're learning all the various predefined
dispatching readmacros and forget that the undefined non-letter ones
are available for users, too.

+---------------
| I think Garret originally used E, but I found that hard to remember.
+---------------

That's why I suggested #" -- to me it implies a special kind of string.
And I don't worry about typing it up for C-like strings, since one
could always use an integer prefix to select some *other* type of
special string if needed.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607