[mochikit] Re: Iter: __iterable__ support?

2010-11-20 Thread Fredrik
FYI, here the actual links to the changes:

adding __iterator__: 
https://github.com/mochi/mochikit/blob/b54de3b0429396cb86edd2c1ade0860831b65379/MochiKit/Iter.js
.. dropping __iterator_:
https://github.com/mochi/mochikit/blob/3022d8755cf932a9581f0ba19134472a368c6d64/MochiKit/Iter.js

On Nov 21, 12:51 am, Fredrik fblomqv...@gmail.com wrote:
 Hi.

 In Iter.js I find this, regarding the support for the __iterator__
 pattern.

 //---
 // XXX: We can't support JavaScript 1.7 __iterator__ directly
 //      because of Object.prototype.__iterator__
 //---

 In Git/SVN the only message to the (reverted) change (2006-05-18) is
 oops :)

 The Google Closure library seems to sniff for it for example, 
 see:http://closure-library.googlecode.com/svn/docs/closure_goog_iter_iter...

 Is this still applicable? Supporting __iterable__ would be very useful
 I'd say.
 .. Guess this more or less a question for Bob himself but if anyone
 has knowledge about this issue please enlighten!

 Regards
 // Fredrik Blomqvist

-- 
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochi...@googlegroups.com.
To unsubscribe from this group, send email to 
mochikit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en.



Re: [mochikit] Re: Iter: __iterable__ support?

2010-11-20 Thread Bob Ippolito
If I remember correctly the problem is that __iterator__ was defined
on Object.prototype (to iterate over keys), so everything had it, and
it made the registry worthless. Maybe if we moved that code to after
the registry, or maybe checked to see if iterator.__iterator__ !==
Object.prototype.__iterator__ before the registry, and then just a
regular check after.

It looks like they moved that behavior to Iterator though, so maybe
it's ok to bring back.

On Sun, Nov 21, 2010 at 7:55 AM, Fredrik fblomqv...@gmail.com wrote:
 FYI, here the actual links to the changes:

 adding __iterator__: 
 https://github.com/mochi/mochikit/blob/b54de3b0429396cb86edd2c1ade0860831b65379/MochiKit/Iter.js
 .. dropping __iterator_:
 https://github.com/mochi/mochikit/blob/3022d8755cf932a9581f0ba19134472a368c6d64/MochiKit/Iter.js

 On Nov 21, 12:51 am, Fredrik fblomqv...@gmail.com wrote:
 Hi.

 In Iter.js I find this, regarding the support for the __iterator__
 pattern.

 //---
 // XXX: We can't support JavaScript 1.7 __iterator__ directly
 //      because of Object.prototype.__iterator__
 //---

 In Git/SVN the only message to the (reverted) change (2006-05-18) is
 oops :)

 The Google Closure library seems to sniff for it for example, 
 see:http://closure-library.googlecode.com/svn/docs/closure_goog_iter_iter...

 Is this still applicable? Supporting __iterable__ would be very useful
 I'd say.
 .. Guess this more or less a question for Bob himself but if anyone
 has knowledge about this issue please enlighten!

 Regards
 // Fredrik Blomqvist

 --
 You received this message because you are subscribed to the Google Groups 
 MochiKit group.
 To post to this group, send email to mochi...@googlegroups.com.
 To unsubscribe from this group, send email to 
 mochikit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/mochikit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochi...@googlegroups.com.
To unsubscribe from this group, send email to 
mochikit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en.