[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Enumerable#to_a can run forever
From:       Benjamin Kudria <ben () kudria ! net>
Date:       2007-12-26 0:33:40
Message-ID: 7fde431cec578b698e15e83551e10b42 () ruby-forum ! com
[Download RAW message or body]

Yukihiro Matsumoto wrote:
> |Fair enough - but then does it make sense to have these operations 
> |defined?
> 
> Because it's very pragmatically useful for most of the case.
> Theoretical cleanliness is not my concern.

Aah, I see.  I guess I agree.

> |Perhaps there should 
> |be a way to distinguish between sets that are countable finite and those 
> |that are countably infinite?
> 
> And adding one burden to library implementer (including me)?

Fair enough :).  It would probably be overly confusing for the coder, 
too.

> |Does 1.9 include provisions for handling 
> |infinite lists or sets?
> 
> I think you mean generator.  If so, it has been supported since 1.8.

You are correct, I see Generators in 1.8 can do everything I want. 
Seems I don't know Ruby as well as I thought. :)

Thanks for clarifying everything.

Ben Kudria
--
http://ben.kudria.net | Jabber: ben@kudria.net
-- 
Posted via http://www.ruby-forum.com/.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic