On Mon Dec 22 09:46:43 2008, cspencer wrote:
> 
> The attatched patch lets an infinite Range (ie. (1..Inf)) report its 
> length as Inf.
> 
> It also adds temporary !FAIL cases when an infinite range is converted 
> into a list or string context.

The patch needs some rework before it can be accepted.  

First, I'd prefer to avoid the duplication of code between the
get_integer and get_number vtable functions; better would be put the
logic into the .elems method, and then have the vtable functions get the
results from .elems instead of vice-versa.

Second, I'd like .elems to be able to figure out the size of the range
without having to generate the full list and take the size of that. 
(That might not be easy to manage, so I'll accept an interim patch that
builds the list for now if that's all we can do.)

Third, note that the get_string vtable function can't really return a
!FAIL, because it's constrained to return only native strings (which
can't hold a Failure object).  So that probably needs some rework.

So, work on those a bit and resubmit.   Thanks!

Pm

Reply via email to