[dojo-contributors] [feedback wanted] Preferred Iteration forms

Bill Keese bill at dojotoolkit.org
Sun Apr 2 21:39:22 EDT 2006


 > I'm saying that that [iterating via callback function] is supported by
 > dojo.lang already, for native collections (i.e. arrays), and does not
 > need duplication within the Collections.

Sorry Tom, I don't understand what one thing has to do with another.

   Are you saying that people who like callback functions should avoid 
using the Collection classes?  Or maybe you are saying that you can call 
dojo.lang.forEach() on Collection objects?  (I don't think you can.)

It seems to me that being able to call forEach(), every(), and some() on 
Graphs etc. is a useful feature that will save other people writing 
lines of code.

Bill

Tom Trenka wrote:
> I'm saying that that particular style of iterating is supported by 
> dojo.lang already, for native collections (i.e. arrays), and does not 
> need duplication within the Collections.
> 
> trt
> 
> On 4/2/06, *Bill Keese* <bill at dojotoolkit.org 
> <mailto:bill at dojotoolkit.org>> wrote:
> 
>     Tom Trenka wrote:
>      > The key here is that the collections are aimed at people
>      > coming from more static languages (and less functional ones).  
>     Either
>      > way, you'll notice (AFAIK) nothing in Dojo itself relies on the
>      > Collections, and that's probably the way it should be :)
> 
>     It's true that currently collections are aimed at people coming from
>     more static languages, but wouldn't dojo be more useful if you could use
>     iterate collections w/callback functions?  Are you saying that it's not
>     useful, or just that we aren't doing it?
> 
>     Bill
>     _______________________________________________
>     dojo-contributors mailing list
>     dojo-contributors at dojotoolkit.org
>     <mailto:dojo-contributors at dojotoolkit.org>
>     http://dojotoolkit.org/mailman/listinfo/dojo-contributors
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors



More information about the dojo-contributors mailing list