Re: Symbol-macros?
.... I suspect that the reasons are largely historical. To whit:
If a symbol were merely a name pointing to a reference cell which holds the value and the function binding, and the plist, then after entering a defun or lambda expression, if the compiler were to store a pointer to the reference cell, there would be no easy way to decompile the definition back to S-expr, showing the original symbol names.
That probably hearkens back to the old days when Lisp was largely interpreted.
A reference cell implementation would easily permit arbitrary naming of the same cell. But which name was used upon decompilation? And besides, that would necessitate additional storage in the compiled expression in order to reveal the originally used symbol name.
It looks like, in order to support this kind of thing, the nature of the symbol reader, and packages, would have to be expanded to permit the notion of "indirect symbols" - where an alias is indirected at runtime to the original symbol. That slows things down.
.... but so does this:
(defmacro alias (sym fn)
`(defun ,sym (&rest args)
(apply #',fn ,args)))
.... and this loses the original lambda list for quick documentation purposes.
Dr. David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ 85750
email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com