[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lexical closure bug?
- To: robby+@CMU.EDU
- Subject: lexical closure bug?
- From: email@example.com (Bob Hall)
- Date: Thu, 21 Oct 93 08:57:28 EDT
- Cc: firstname.lastname@example.org
- In-reply-to: Robert Bruce Findler's message of Wed, 20 Oct 1993 18:50:29 -0400 (EDT) <AglQ2pq00UhBQ8Wldp@andrew.cmu.edu>
Date: Wed, 20 Oct 1993 18:50:29 -0400 (EDT)
From: Robert Bruce Findler <robby+@CMU.EDU>
> A different implementation of do, which used tail recursion instead of
> tagbody/go and so established a new binding of a for each iteration
> produced the result you expected.
I see. Is do coded that way for a reason? To me, the way that MCL coded
do seems counter-intuitive. I don't generally expect variables to
changed out from under me. Is it much faster to be that way?
As I read CLtL2, p.165, binding on each iteration is explicitly disallowed.
(Of course, I don't know whether the ANSI standard reads this way.)
"Before the first iteration, all the init forms are evaluated, and
each var is bound to the value of its respective init.
This is a binding, not an assignment..."
"At the beginning of each iteration other than the first, the index
variables are updated as follows. All the step forms are evaluated
...and the resulting values are assigned to the respective index variables."