[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bad to hang properties off keywords to install their semantics

    Date:  5 Dec 1985 0020-PST
    From: Rem@IMSSS

    I don't think it's a good idea to implement keyword usage (semantics) by
    having each function that uses that keyword to hang a property off that
    keyword. The reason is you can have hundreds of different uses for a single

I don't see how that's different than the case with any symbol, except that
there is greater likelihood that there will be more code that knows about it.
What about "t"?  Or "print"?  Is it a good idea to put properties on them?

One of the profound features of Lisp is the set of services done
magically by the reader, most specifically, interning, done before the
program is even run.   That you do not have to look up names in symbol
tables, in the course of your program, as in other languages, but can go
"directly" to a referenced symbol and inspect its properties:  this is a
major linguistic feature.  You pay for this somewhere; Property lists
assume you have many more symbols than things you might want to say
about any of them.  When that is not so, you pay.   That is the tradeoff
of using property lists at all.   Saying "hey, for keywords, there is
some chance you'll really have to start paying", is OK, but putting the
blame for the problem anywhere but with the basic idea of property lists
(or, as has been noted, the requirement of cons-pair implementation) is