From: jimmy thrasher Date: 2001-08-01T21:34:25+09:00 Subject: [ruby-talk:18955] Re: newbie autovivification It seems to me that this is a prime example of something that could be a Behavior (a la David Black). Just brainstorming, Jimmy Hugh Sasse Staff Elec Eng wrote: > > On Wed, 1 Aug 2001, Nat Pryce wrote: > > > > > Please add this cool Python stuff to Ruby. > > > > > > > > If 25 < foo < 75 : print "middle" > > > > > > This would be nice, but it requires hacking the parser, which (as far as > > > I understand) is already a complex beast. At least "25 < x < 75" raises an > > > exception in Ruby. It doesn't silently give the wrong answer (as in C). > > > > And you can use a range: > > > > print "middle" if 25..75 === foo > > > > > I wrote about this a while ago. See: > > http://www.eng.cse.dmu.ac.uk/~hgs/ruby/comparisons.html > > > > Hugh > hgs@dmu.ac.uk