From: Hal Fulton Date: 2006-02-08T10:05:27+09:00 Subject: Re: lazy evaluation? Martin DeMello wrote: > vidar.hokstad@gmail.com wrote: > >>It's your assumption of where the "retry" restarts execution that's >>wrong... Essentially the retry in "repeat" will restart execution right >>before the call to repeat, not at the start of the "repeat" method, >>thus evaluating the arguments again. >> >>You can see that by changing your code so that there's an observable >>side effect of the reevaluation: > > > This seems wrong to me, for precisely the reason you cite - it means > that I can never do something like object.foo(ary.pop), without > physically reading the source of #foo to see whether it calls retry > anywhere. I never thought of it that way. I always thought of it in the context of reevaluating an expression whose value might have changed -- but side effects never occurred to me. Hal