Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!swrinde!howland.reston.ans.net!ix.netcom.com!netcom.com!vrotney
From: vrotney@netcom.com (William Paul Vrotney)
Subject: Re: :keywords as function and macro names?
In-Reply-To: dorai@cs.rice.edu's message of 8 Apr 1996 15:27:35 GMT
Message-ID: <vrotneyDpMG6I.1x6@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <4kbb97$h21@larry.rice.edu>
Date: Wed, 10 Apr 1996 01:01:29 GMT
Lines: 29
Sender: vrotney@netcom.netcom.com

In article <4kbb97$h21@larry.rice.edu> dorai@cs.rice.edu (Dorai Sitaram) writes:


> 
> I note that CLISP lets me use :keywords as function and
> macro names, e.g.,
> 
> (defun :cons ...)
> (defmacro :let ...)
> 
> are allowed.  But is this portable usage?
> 
> --d

Yes.  Keyword symbols are guaranteed to be just like any other symbols
except for two things: they are all external to the keyword package and they
are all by default constants that evaluate to themselves.  The first is
something you should be wary of since all such functions defined will be
external.  The second only reserves the SYMBOL-VALUE property of a keyword
symbol, so you are free to do portably whatever you want with the other
built in properties SYMBOL-FUNCTION and SYMBOL-PLIST.

However, if you are going to do this you should probably have a good reason
to do this over creating a separate package since if two programs did this
their symbols would collide because of the "all external" property.

-- 

William P. Vrotney - vrotney@netcom.com
