From: Robert Dober Date: 2007-02-20T06:26:16+09:00 Subject: Re: For loops don't count down On 2/19/07, dblack@wobblini.net wrote: > Hi -- > > On Tue, 20 Feb 2007, Robert Dober wrote: > > > On 2/19/07, dblack@wobblini.net wrote: > >> Hi -- > >> > >> On Tue, 20 Feb 2007, Robert Dober wrote: > >> > >> > On 2/19/07, Yukihiro Matsumoto wrote: > >> >> Hi, > >> >> > >> >> In message "Re: For loops don't count down" > >> >> on Tue, 20 Feb 2007 02:45:27 +0900, Daniel Schierbeck > >> >> writes: > >> >> > >> >> |Is there a necessity for a range such as 5..0 to be empty? > >> >> > >> >> 5..1 is the easiest case, > >> > No it is not, how could we distinguish between a "reversed" range and > >> > an "empty" range. > >> > but what if "abz".."abc" where we couldn't > >> >> define reasonable String#pred. Just raise error? > >> > With all due respect if we have a reasonable String#succ we can define > >> > a reasonable String#pred. > >> > >> See the thread starting at ruby-talk 38910 for an earlier discussion > >> of this. It's not easy, and it's arbitrary and of questionable > >> usefulness. (I don't think ranges need to be any more array-like than > >> they already are -- possibly less.) > > > > I do not like the lack of symmetry it just feels not right. > > You should adopt my Ruby slogan: > > Ruby: the triumph of balance over symmetry. > > :-) It's easy when you are with the majority, do you remember the thread about "receiver" though ;) [ I still think you are right about that one] I kind of hope to be right with this one, but I am checking the thread now. Cheers Robert > > > David > > -- > Q. What is THE Ruby book for Rails developers? > A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) > (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) > Q. Where can I get Ruby/Rails on-site training, consulting, coaching? > A. Ruby Power and Light, LLC (http://www.rubypal.com) > > -- We have not succeeded in answering all of our questions. In fact, in some ways, we are more confused than ever. But we feel we are confused on a higher level and about more important things. -Anonymous