From: Marko Schulz Date: 2002-04-29T05:26:13+09:00 Subject: Re: Numberic#prev On Sun, Apr 28, 2002 at 02:20:47AM +0900, Christoph wrote: > "Yukihiro Matsumoto" wrote in > .... > > > > |*) No one seems to think Integer#prev is a bad idea > > > > It's not bad, but useless. "succ" is useful with polymorphism as used > > in Range, but no other non-numeric class defines "prev", there's no > > benefit. what's wrong with "n-1"? > > On the other hand what is useful about > > (2.2..4.3) == (2..4) # => false That is false because the ranges really are different: (2.2..4.3) === 2.1 # => false (2 ..4 ) === 2.1 # => true > (2.2...4.3) == (2...4) # => false Or do you mean how useful it is to have '..' as well as '...'? Well people are used to it in Perl too. It is in perl, because the Ranges in awk and sed are different. '..' resembles the awk range, '...' resembles the sed range. Both have their uses, while '..' seems to be more popular. -- marko schulz