Re: Confused by behavior of LispWorks for code snippet
- From: Damien Kick <dkixk@xxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 12:01:30 -0500
Tobias C. Rittweiler wrote:
Damien Kick <dkixk@xxxxxxxxxxxxx> writes:
Tobias C. Rittweiler wrote:Damien Kick <dkixk@xxxxxxxxxxxxx> writes:I don't find anything in the hyperspec which seems to support this. I
I would've expected (EQ #'F #'G) => T. I am getting that result,FUNCTION is allowed to return a fresh function object.
i.e. (EQ #'F #'G) => T, with both Allegro CL 8.0 and Clisp. Is
LispWorks mistaken or is that an allowable result?
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.
I'm not convinced. From 3.1.4
<blockquote>
In situations where a closure of a lambda expression over the same set of bindings may be produced more than once, the various resulting closures may or may not be identical, at the discretion of the implementation.
</blockquote>
So it seems to me that this is saying that evaluating the same lambda expression more than once is allowed to produce different closures. But my reading of the text would lead me to expect (FLET ((F ...)) (EQ #'F #'F) => T but (FLET ((MAKE-F () #'(LAMBDA ()))) (EQ (MAKE-F) (MAKE-F))) => implementation-defined. In this case, the two behaviorally indistinguishable functions returned by MAKE-F might not be identical. But, again, perhaps I'm missing something. However, with the fact that even other versions of LispWorks produce the results I was expecting, I'm pretty confident that this is a bug in the version of LispWorks I was using.
.
- 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
- Re: Confused by behavior of LispWorks for code snippet
- From: Tobias C. Rittweiler
- Confused by behavior of LispWorks for code snippet
- Prev by Date: Re: (not about) Re: How To Learn Lisp
- 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):