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

Re: misc questions

    Date: Wed, 5 Mar 86 03:46 EST
    From: Christopher Fry <cfry@OZ.AI.MIT.EDU>
    To: common-lisp@SU-AI.ARPA
    Subject: misc questions
    Message-ID: <860305034651.1.CFRY@MOSCOW-CENTRE.AI.MIT.EDU>
    What does WITH-OPEN-FILE return?
    I can't find it in CLtL.
    I'd prefer that it return the value of the last form in its body.
I believe this is what most implementations do (since it is stated that
the forms of the body are an implicit PROGN).  This should be
'clarified' though.
    When SYMBOL-FUNCTION is passed a symbol which refers to
    a macro or special form, what does it return?
There was a lot of discussion about this a few weeks ago.  My
impression of the result of that discussion was that SYMBOL-FUNCTION
could return ANYTHING (including NIL) when passed a symbol that names
a macro or special form.  All you can count on is that it WON'T signal
an error and it will return something.  Of course, when passed a
symbol that names an actual function, you can assume that what is
returned is the function def. and that it can be applied, etc.
    If FUNCTION is passed a definition, does it simply return it?
I assume by 'definition' you mean a lambda expression.  When passed a
lambda expression, FUNCTION may return a closure (an actual data type
in some implementations, the original lambda (if no env. info. is
needed), a compiled-code object (if you are using POPLOG LISP :-)), or
any lisp object that is appliable or funcallable and that 'represents'
the original lambda expression and its defining env.
	-- Nick