Re: Keyword syntax
In article <email@example.com>,
Rupert Swarbrick <firstname.lastname@example.org> wrote:
> RG <rNOSPAMon@flownet.com> writes:
> > ...
> > where the natural interpretation of foo: would be 'foo::|| rather than
> > the desired '||::foo (or keyword::foo).
> Oh! Is that the logic behind why keywords are written :like :this? So
> the keyword package is the one with the empty name, I presume. And
> exports all its symbols automatically?
It would be nice if that story were actually true, but alas it's not.
The name of the keyword package is actually "KEYWORD". As a purely
practical matter, :foo instead of foo: makes the parsing code simpler
because keywords can be read with a reader macro on the #\: character.
There is room within CL's syntax space to support foo: instead, and you
can even implement that at the user level, but it takes some pretty
major readtable hacking.