Thread: Anti-Loop
View Single Post
  #102 (permalink)  
Old 03-13-2012, 04:41 PM
Barry Margolin
Guest
 
Posts: n/a
Default Re: Keyword syntax

In article <87ty1s5z9n.fsf@kuiper.lan.informatimago.com>,
"Pascal J. Bourguignon" <pjb@informatimago.com> wrote:

> Now the question is an historical question. What did implementations do
> before CL? Did they have a reader macro? Did they have keywords
> without having packages?
>
> I doubt that the notion of keyword came around before the notion of
> package. It's possible for the self definining feature, but I find it a
> weak reason.


I think packages and keyword arguments were both introduced in Lisp
Machine Lisp.

LM Lisp's package system was a little different from CL's. Instead of
packages importing from each other, they were organized in a hierarchy.
Searching for a symbol name worked by looking first in the current
package, then its superpackage, and so on up to the GLOBAL package.

Originally there was no special keyword package, :SYMBOL was a shorthand
for USER:SYMBOL. And they weren't self-evaluating, you had to quote
them. I think it was when the Flavor system was designed that they may
have added the self-quoting of keywords, but I'm not sure.

Maclisp had reader macros, but it didn't have packages or keywords.
Maybe some user-written libraries used keyword-style arguments, and this
was probably where the LM Lisp designers got the idea and formalized it.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Reply With Quote