[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: misc questions
- To: common-lisp@SU-AI.ARPA
- Subject: Re: misc questions
- From: NGALL@G.BBN.COM
- Date: Wed, 05 Mar 1986 14:05:00 -0000
- Cc: cfry%oz@MC.LCS.MIT.EDU
- In-reply-to: <860305034651.1.@MOSCOW-CENTRE.AI.MIT.EDU>
- Sender: NGALL@G.BBN.COM
Date: Wed, 5 Mar 86 03:46 EST
From: Christopher Fry <cfry@OZ.AI.MIT.EDU>
Subject: misc questions
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
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.