[Pharo-users] Interval form: x to: y when x > y - or how to count down...

Offray Vladimir Luna Cárdenas offray.luna at mutabit.com
Sat Feb 23 11:05:21 EST 2019


On 22/2/19 16:57, Sven Van Caekenberghe wrote:
>
>> On 22 Feb 2019, at 22:35, Tim Mackinnon <tim at testit.works> wrote:
>>
>> If it’s always been that way - and things rely on it, sure.
>>
>> But it doesn’t feel like the Smalltalk way to me.
>>
>> Having to know about adding -1 seems very C, whereas Smalltalk always seems more natural ... and 5 to: 1 seems like you would count down, not be an empty range and do nothing.
>>
>> But as you say, it’s personal. I’m still curious though.
> I personally would find it cool if
>
>  10 to: 1
>
> counted down, it feels natural. But I must say I haven't thought it through.
>
> I do known that Interval is a class that leads to lots of discussions and disagreements.
>
I agree with Tim and Sven: "bigger to: smaller" should count backwards,
if we think in the way we used on a day to day expectation.

Cheers,

Offray




More information about the Pharo-users mailing list