From: Yossef Mendelssohn Date: 2007-11-20T00:13:36+09:00 Subject: Re: Open-ended ranges? On Nov 19, 6:54 am, "Todd Benson" wrote: > On Nov 19, 2007 6:44 AM, al_batuul wrote: > > > Dear Clifford, > > > Defining an open-end class is a great idea; the rang from 1..nil or 0 to nil could help now, I suggest you add different types of parameters to the class such as time. > > > all the best, > > Yes, would it help you really? > > Let's make all data define itself. Let's make stuff work for now. > I'm not convinced that 1 to (what's supposed to be) some object of > NilClass will help anybody anywhere. > This subject has come up more than once. I've worked on it myself, and found a passable (if incomplete) solution. What I don't understand is why so many people find an open-ended range to be pointless. That is to say I do understand why --- because they're set on iterating over the range --- but I don't understand why they consider that to be the only use of a range. Everyone I've seen who's interested in this (myself included) is using these ranges for another reason, to indicate a range of acceptable (or maybe even unacceptable values). A range like 5..Infinity is not intended for iteration, but for comparison. -- -yossef