On Thursday 07 October 2004 11:27 am, Markus wrote:
| On Thu, 2004-10-07 at 07:11, trans. (T. Onoma) wrote:
| > --only Numeric ranges can be Continuous.
|
|      Not so.  Time ranges, for example, can be Continuous, as could
| Colour or FuzzyTruthValue or...

True. Although I think one could argue, that the defining characteristic is a 
*capability* to functionally map to rational numbers. So in a sense they are 
numeric too, even if they don't use Numeric as a base class. Is that 
important? 

So yes, you are right. We need to consider Intervals of variant objects. But 
how?

| > Consider further how succ determines successive members --a Range is an
| > indeterminate ordered set built by iteration. Oddly one defines a Range
| > with a first and last argument, but iterations are supposed to be defined
| > by a seed (first) and the number of successive iterations.
|
|      Supposed by whom?  You can just as easily define an iteration with
| a termination test (e.g. iterating over the lines of a File).

Okay, sure. My point was simply that you get no promises with a termination 
test.

| > And there is good
| > reason for this: there is no way to be sure that any given _last_ is a
| > member of the set! Look at this:
| >
| >   class ShrinkyDink
| >     def initialize(x); @x = x.to_i; end
| >     def succ; @x - 1; end
| >     def <=>(b); @x <=> b; end
| >   end
| >
| >   rng = ShrinkyDink.new(0)...ShrinkyDink.new(100)
| >
| > Not only is ShrinkyDink.new(100) not a member of the range, but nothing
| > "inbetween" the two is either!
|
|      This fails because the implementation of either succ or <=> is
| aberrant; by definition x.succ > x, while that is not the case for
| ShrinkyDinks.  If you start going down that path (e.g. "but what if they
| write:

Not really. I went to an extreme purposefully to demonstrate a point. For 
something more realistic try the Collatz conjecture.

Nonetheless, I take it your point is basically "it's the programmers problem" 
with regards to whether there's a real end member or termination?

T.