ANSI Common Lisp defines no class with the name KEYWORD
. It is a non-portable extensions of Clozure Common Lisp.
There is also no portable way to introduce such a class.
Since symbol
is a built-in class, you can't extend it with a subclass.
So I think the simple IF
is ugly, but necessary. Another solution would be much more involved (imagine using the MOP to introduce a new way to dispatch over an own parallel class structure for types...).