[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: symbol-class is bad name
> Consider the situation if we had a true lisp-1. If that were the case,
> classes, functions and `variables' would share the same namespace.
> The idea is that only a symbol can name
> a class, so the function should have the string "symbol" in it.
I think symbol-class would be a good name if symbol-<whatever> had some
consistency to it. But it doesn't. I don't like the fact that
symbol-package does not name a package. If I say:
I might get:
#<Package USER #x223112>
Also what does symbol-name name? Is a string a name? Should symbol-name
return the symbol itself since symbols are intended to be used for naming?
The fact is that we don't have a lisp-1, but more like a lisp-5. I tend to
think of symbols as structures with slots that contain specific types of
data. The symbol-package slot can be thought to contain a package, but
does not "name" one. Similarly the symbol-function slot contains a
function. This same function may be contained somewhere else too.
Symbol-name contains a string. Symbol-plist contains a property list.
Symbol-class is a fine name, provided we establish the convension that
symbols are used for naming in lisp (Common Lisp that is, not Scheme). I
just don't think they're really thought of that way in practice. There's
just this kludgy thing called the interpreter that tends to use them that
way some times.
P.S. Maybe we should just pick a meaningless name in the typical lisp
tradition. Classics like CDR, NCONC, RPLACA and PSETF come to mind. Or
how about FOO? Nobody's really used FOO yet.