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

the meaning of #,



    Date: 13 Jul 1984 1320-PDT
    From: AS%hp-labs.csnet@csnet-relay.arpa

    I am having a lot of trouble understanding the intended meaning of "#," in
    compiled code.  I find it hard to believe that it is really intended to be
    like "#.", as the manual implies.  In particular, the result of "#." in a form
    becomes PART OF the form.  Thus, for example, you can do (DEFMACRO FOO
    #.(MUMBLE) ...) and the result of invoking MUMBLE is used as the parameter
    list to DEFMACRO.  Similarly, if I say (SETQ X #.(MUMBLE)) and MUMBLE returns
    a list, then the list will be evaluated.  Is the intent that "#," can be used
    this way (in compiled code), or can it be used only within quoted structures?
    Implementors: How have you implemented "#,"?  Are there are restrictions on its
    use?  If so, can they be stated clearly?

This feature was taken from the Lisp Machine.  The intention is that #, can only
be used in constants, not in forms.  For example, compiling a file containing
the form (DEFUN FOO () #,BAR) gives an error.  (DEFUN FOO () '#,BAR) works.
Anything that the compiler actually has to process at compile time cannot be
a #, since such objects do not exist until load time.

I see what you mean about having a lot of trouble understanding it: the
writeup on #, in the Common Lisp manual is even worse than the writeup
on it in the Lisp Machine Manual.