Mark J. Reed wrote: > On Tue, Aug 25, 2009 at 5:58 PM, Jon Lang<datawea...@gmail.com> wrote: >> Also, I want to second David Green's point: we're not talking "Range" >> and "Interval" here; we're talking "Range" and "Series". > > But a "series" refers to a more general concept than a discrete range. > I still think Range and Interval fit better.
IME, "range" and "interval" are largely interchangeable terms. The only time that they aren't is when "range" is used in contrast to "domain"; and even there, it still doesn't refer to a list of discrete values. That's generally referred to as a sequence; unfortunately, that's a term that Perl has already co-opted. >> using Complex for your endpoints should result in an error: Complex numbers >> don't have a viable definition of "before" or "after", let alone "between". > > Slight overstatement, IMO. Sure, complex numbers don't form an ordered > field: given three numbers, z0, z1, and z2, you can't ask if z0 > z1 > or z0 < z2, at least not without imposing some artificial ordering > rule. Even without defining an ordering, though, you can meaningfully > ask whether z0 lies within or outside the rectangle formed by z1 and > z2, which is a viable (if nonlinear) definition of "between". You can > only get a Boolean answer, but it's a valid question. It's also every bit as artificial as the ordering rules that can be imposed. It would be just as valid to ask whether z0 lies on the line segment that runs between z1 and z2, or within the smallest circle that includes z1 and z2. And if you _do_ establish an artificial ordering rule, it's also perfectly valid to ask if z0 is after z1 and before z2 (or vice versa, if z2 is before z1). > That's just nitpicking, though. It's perfectly reasonable to fail() > if someone tries to construct a Range/Series/Interval out of Complex > numbers. We can use a different class for complex rectangles if we > need them. Agreed. -- Jonathan "Dataweaver" Lang