Long live duck typing[1]!

If it has an each, it can probably enumerate. :)

Best,
Thomas

[1] http://en.wikipedia.org/wiki/Duck_typing

Am 20.02.2007 um 13:16 schrieb Christophe Porteneuve:

>
> Hey Mislav,
>
> Mislav Marohnić a écrit :
>>     I would like to see a isEnumerable, but this can be a problem:  
>> what
>>     should we test for?  Enumerability, so far, is obtained  
>> through "mixing
>>     in" methods.
>>
>> obj.each == Enumerable.each
>
> Hmmm, yeah, but is that really enough?
>
> -- 
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to