Robert Feldt wrote:

> Ruby doesn't have infinite or unbounded data (by default) structs so what
> should this mean? We would have to add Inf (might be good for other
> situations) and introduce Object#default_max_value, but how to handle
> 
> (1..).to_a
> 
> without going for lazy evaluation?

Hmmm.  Well, Ranges are lazily evaluated; they are not converted internally 
to arrays, and I don't see any reason why they open-ended ranges wouldn't 
be possible -- EXCEPT for the to_a issue, which is indeed a stumper.  But, 
consider, for a moment, a number class tha wraps Integer, which provides 
constants INFINITY and NEGATIVE_INFINITY, and which supports succ and <=> 
such that x <=> MyInt::INFINITY is always -1.  You could easily make a 
range of this, although to_a would hang.

Anyway, as I think about this, it seems less and less useful.  I've 
forgotten why I wanted them in the first place; I'm sure I'll stumble on a 
similar situation again, and then I'll repost the argument with an example 
of reasonable need.

>> PS.  I was following the "versioned require" discussion for a while, but
>> it
....
> Many people seem to think that something along those lines would be a
> good thing. There is not yet a consensus on which semantics to use and how
> to implement. Maybe the RAA.succ/RubyGems discussion/solution can revive
> this discussion again?

I've seen at least one extension which enabled this, but this is the sort 
of thing that is almost useless unless it is ubiquitous.  IE, the NEED for 
this is usually in moving software around from one machine to another, so 
if it isn't part of core Ruby, its usefullness is extremely limited.

--- SER


-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----