From: Yukihiro Matsumoto Date: 2004-10-08T17:31:41+09:00 Subject: Re: Range behavior (Re: [RCR] New [] Semantics) Hi, In message "Re: Range behavior (Re: [RCR] New [] Semantics)" on Fri, 8 Oct 2004 13:56:25 +0900, "trans. (T. Onoma)" writes: |Okay. The problem is that Range behavior is contradictory. Maybe this will |help: | | def check(a) | case a | when 0..10 then | true | else | false | end | end | | check(4.5) # true or false ? | |So #=== and case statements have two potential meanings for Range, and both |are useful. Currently the answer is true --indicating a continuous range. But |this is counter to the definition of a Range which, being dependent on #succ, |is actually discrete. HTH. I don't agree with the word "contradictory". The above function returning true would have no problem, wouldn't it? Here's my possible plans: planA - leave member? and include? as they are; they are very easy to distinguish, and to remember. why bother? planB - making member? as alias to include?; they behave same. no confusion, no problem. who wants membership for ranges? The planB solves your second problem (slowness) as well. matz.