I was resuming work on my Sheepshead game today (more will be coming in time on this), and it occurred to me: what is the difference between a symbol and a keyword? If you type
(symbolp 'foo)
and
(symbolp :foo)
both return
T
but, if you type
(eq 'foo 'foo)
(eq :foo :foo)
both return
T
yet
(eq :foo 'foo)
returns
NIL
Finally, if you type
(symbol-name 'foo)
and
(symbol-name :foo)
both return
"FOO"
So, what gives? Both are symbols and symbols with the same print name, at that. The difference, is that keywords are all generated in the KEYWORD package, but symbols identified with the QUOTE operator are generated in the current package. So,
* (symbol-package 'foo) #
but
* (symbol-package :foo) #
Just a quick little tidbit.