On 1/12/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
> I think that Dave has a point about a Range[Real] being an infinite
> set: According to DWIM, if I see "4.5..5.7", I don't think of "4.5,
> 5.5"; I think of "numbers greater than or equal to 4.5 but less than
> or equal to 5.7".  Likewise, "4.5^..^5.3" contains "numbers greater
> than 4.5 but less than 5.3", not "an empty list".

That's good, because that's what it does.  A "range object" in list
context expands into a list, but in scalar context it is there for
smart-matching purposes:

    3.5 ~~ 3..4   # true
    4   ~~ 3..^4  # false


The only remaining problem is that we have no syntax for ...3, which
doesn't make sense as a list, but does make sense as a range.


Reply via email to