From: John Joyce Date: 2007-10-25T23:38:05+09:00 Subject: Re: Intervals in Ruby On Oct 25, 2007, at 5:00 AM, Steven D'Aprano wrote: > On Thu, 25 Oct 2007 01:43:33 +0000, Steven D'Aprano wrote: > >> I understand that in Ruby you have quite a few choices, some of which >> are half-open like Python, some of which are closed: > ... >> My question is: how useful are all these different mechanisms? Do you >> find that having two operators .. and ... is a blessing, or a curse >> because you can never remember which is which? >> >> How useful are the closed interval forms? Do you find yourself making >> off- by-one errors or needing to increment/decrement variables by >> one? > > > Thank you for everyone who wrote back, all good food for thought. > > Are there many (any?) good examples of where you need to iterate > over an > integer count, rather than directly over a data structure? > > > > -- > Steven > If there is one thing Ruby gets right over every other language it's iteration/looping mechanisms. they look strange at first, but use them a bit and the feel natural