> On 1 Mar 2019, at 12:22, Tim Mackinnon <tim@testit.works> wrote:
> 
> Actually thats quite a good suggestion - it probably should have been:
> 
> #upTo:
> #downTo:
> #to:by:
> 
> In the first place (but I’m guessing this change will never happen)

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.

>> On 1 Mar 2019, at 05:35, K K Subbu <kksubbu...@gmail.com> wrote:
>> 
>> On 28/02/19 6:33 PM, Tim Mackinnon wrote:
>>> So I would expect “1 to: 0” to see:
>>> 1 -> 1
>>> 2 -> 0.
>> 
>> It is difficult for code to guess the intent of the coder. Did the coder 
>> intend an decreasing sequence or a stopping condition (i == end or i > 
>> end?). Perhaps, we could use an explicit selector:
>> 
>> 5 downto: 1
>> 
>> to disambiguate between the two cases.
>> 
>> Regards .. Subbu
>> 
> 
> 


Reply via email to