I just added the patch submitted with ticket #2133 to the SVN trunk, with slight modifications. (And yeah, I know I said "bug fixes" only till 1.5, but this patch probably counts as a bugfix). Big thanks to the contributors on this! I''ll probably will give it a second pass and will do some refactoring. Anyone want to work on/can come up with some sort of generalized "save/restore" functionality...? Unit tests are welcome, too. :) The effects are becoming more and more feature-complete. Now it really is about making the code nicer and well-tested. Thomas
On 06/09/05, Thomas Fuchs <thomas@fesch.at> wrote:> I just added the patch submitted with ticket #2133 to the SVN trunk, > with slight modifications.I am glad I have it out of the door, it was kind of hard to keep pace with you the last days :-) (agr30@... is me as well, I am kind of random with my addresses) BTW: Is there any documentation about the iterator stuff in prototype? I am also interested about the performance. For time-critical code like the checks for drag&drop, the overhead might be to much.> I''ll probably will give it a second pass and will do some refactoring.Oh yes, it definitely needs some work. But I have to get some work done on my project now, unfortunately. Bye, Martin
Am 06.09.2005 um 14:24 schrieb Martin Bialasinski:> I am glad I have it out of the door, it was kind of hard to keep pace > with you the last days :-) (agr30@... is me as well, I am kind of > random with my addresses)Ah!> BTW: Is there any documentation about the iterator stuff in prototype? > I am also interested about the performance. For time-critical code > like the checks for drag&drop, the overhead might be to much.True. If you let a unit test pass for "documentation", there is one at: http://dev.conio.net/repos/prototype/test/unit/enumerable.html> Oh yes, it definitely needs some work. But I have to get some work > done on my project now, unfortunately.I perfectly understand this... me too (for the rest of the week). :) Thomas
Michael Schuerig
2005-Sep-06 09:02 UTC
[Rails-spinoffs] Prototype Enumerable (was: "Stateless" effects)
On Tuesday 06 September 2005 15:07, Thomas Fuchs wrote:> > BTW: Is there any documentation about the iterator stuff in > > prototype? I am also interested about the performance. For > > time-critical code like the checks for drag&drop, the overhead > > might be to much. > > True. If you let a unit test pass for "documentation", there is one > at: http://dev.conio.net/repos/prototype/test/unit/enumerable.htmlI only noticed the addition thanks to Martin''s message. K combinator, anyone? Two thinks I noticed. For non-native speakers Enumerable.pluck is hardly understandable without looking at the code. How about Enumerable.project (as an alias)? It''s still not intuitive, but may be understood by more people. The comparisons for _break and _continue are done using the equality operator (==). Wouldn''t the identity operator (===) be more suitable? Looking at the code I got the impression that Sam is out to prove that it''s possible to write Ruby code in JavaScript :-) Michael -- Michael Schuerig Not only does lightning not strike mailto:michael@schuerig.de twice, it usually doesn''t strike once. http://www.schuerig.de/michael/ --Salman Rushdie, Fury
On 06/09/05, Thomas Fuchs <thomas@fesch.at> wrote:> True. If you let a unit test pass for "documentation", there is one at: > http://dev.conio.net/repos/prototype/test/unit/enumerable.htmlThanks, I will have a look. BTW: util.js has if(typeof obj in ["string","number"]) I have never seen such a thing before. javascript:alert("string" in ["string","number"]) shows false. Does it really work? Bye, Martin