On 01/03/19 5:35 PM, Sven Van Caekenberghe wrote:
I like this too.
Why would this not happen ? It is just one selector more.
I think the only possible issue is that #to:do: is known by the
compiler, which makes it faster than any other iteration, even do: -
there is always a tradeoff between readability and raw speed.
Thank you for the kind words. I am not sure if speed would be affected
much by:
downTo: stop
^self to: stop by: -1
downTo: stop do: aBlock
^self to: stop by: -1 do: aBlock
In performance critical paths, one can always use to:do: with explicit
steps.
Regards .. Subbu