On Mon, Oct 17, 2011 at 10:40 PM, St�phane Ducasse
<stephane.ducasse@inria.fr> wrote:
> Just to hammer home the message. �The below, which won't be inlined since the block argument is in a variable,
Elliot what is hammer home?
To get in my skull?
I should reread the thread without my flu and it will go better :)
> � � � | b |
> � � � b := [:i| nil].
> � � � 1 to: 10 do: b
>
> of course answers 1, since
>
> Number methods for intervals
> to: stop do: aBlock
> � � � "Normally compiled in-line, and therefore not overridable.
> � � � Evaluate aBlock for each element of the interval (self to: stop by: 1)."
> � � � | nextValue |
> � � � nextValue := self.
> � � � [nextValue <= stop]
> � � � � � � � whileTrue:
> � � � � � � � � � � � [aBlock value: nextValue.
> � � � � � � � � � � � nextValue := nextValue + 1]
>
> which ends with an implicit ^self.
I should rereade the code thinkking about that hidden self it did not occur to me that I should
think about it.
Stef