Re: Confused by behavior of LispWorks for code snippet
- From: "Tobias C. Rittweiler" <tcr@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 12:57:31 +0200
Damien Kick <dkixk@xxxxxxxxxxxxx> writes:
Tobias C. Rittweiler wrote:
Damien Kick <dkixk@xxxxxxxxxxxxx> writes:
I would've expected (EQ #'F #'G) => T. I am getting that result,
i.e. (EQ #'F #'G) => T, with both Allegro CL 8.0 and Clisp. Is
LispWorks mistaken or is that an allowable result?
FUNCTION is allowed to return a fresh function object.
I don't find anything in the hyperspec which seems to support this. I
could very well be missing something, though. [...]
Well, there's 3.1.4 which says
That is, two /functions/ that are behaviorally indistinguishable might
or might not be identical.
If I remember correctly, this was a bit better worded in either CLtL or
CLtL2. But even there, it required some between-the-lines reading.
I think, it's just consensus that even `(flet ((f ...)) (eq #'f #'f))'
is allowed to return NIL.
But then, it's better to think of FUNCTION operating in this manner
anyway in face of function redefinition, and tracing/profiling.
-T.
.
- Follow-Ups:
- Re: Confused by behavior of LispWorks for code snippet
- From: Damien Kick
- Re: Confused by behavior of LispWorks for code snippet
- References:
- Confused by behavior of LispWorks for code snippet
- From: Damien Kick
- Re: Confused by behavior of LispWorks for code snippet
- From: Tobias C. Rittweiler
- Re: Confused by behavior of LispWorks for code snippet
- From: Damien Kick
- Confused by behavior of LispWorks for code snippet
- Prev by Date: Re: Confused by behavior of LispWorks for code snippet
- Next by Date: Re: (not about) Re: How To Learn Lisp
- Previous by thread: Re: Confused by behavior of LispWorks for code snippet
- Next by thread: Re: Confused by behavior of LispWorks for code snippet
- Index(es):