From: Gavin Sinclair Date: 2003-07-19T15:47:38+09:00 Subject: Re: chaining comparisons On Saturday, July 19, 2003, 3:58:51 PM, Kurt wrote: > When I learned python I was overjoyed that I could evaluate 1 < 2 < 3 > and get "true". I just realized that you can't do that in Ruby. Is > there a reason why? Is it good? I know I can use "between", but > still... I agree it would be cool, but it's pretty clear why Ruby doens't support it: 2 < 3 == true 1 < true == error therefore 1 < 2 < 3 == error Ruby is a very expression-oriented language, and derives its strength from conceptual purity. If an expression evaluated to X in some circumstances and Y in others, a small part of Ruby would be lost. Gavin