Fwd: [dojo-contributors] [feedback wanted] Preferred Iteration forms
ttrenka at gmail.com
Mon Apr 3 11:21:57 EDT 2006
Sorry, emailed it just to Alex first.
---------- Forwarded message ----------
From: Tom Trenka <ttrenka at gmail.com>
Date: Apr 3, 2006 10:21 AM
Subject: Re: [dojo-contributors] [feedback wanted] Preferred Iteration forms
To: alex at dojotoolkit.org
On any of the Array based Collections, you can *always* call toArray and use
the dojo.lang array functions to do functional iteration. In theory you can
do the same with map-based collections by grabbing the KeyList from it and
using dojo.lang.forEach for it.
Why would I want to duplicate that functionality if you've already written
On 4/3/06, Alex Russell < alex at dojotoolkit.org> wrote:
> On Monday 03 April 2006 12:55 am, Tom Trenka wrote:
> > > Are there any technical/efficiency reasons against using functional
> > > style iteration?
> > >
> > > Tom, I get the feeling you are trying to avoid 'scope creep'! You
> > > have unfortunately chosen a fundamental topic to work on,
> > > implementation compromises are difficult, opinions are strong, and
> > > everybody has an opinion! I presumed you were implementing a
> > > generic iterator, yet you talk about a specific need. Tom, can you
> > > give us a better idea of the scope you want to keep within?
> > Technical or efficiency reasons? No, not at all. But the
> > Collections code is modeled on imperative-styles based on languages
> > that do not have the strength or the flexibility of JS/LISP/Scheme et
> > al, and I'm saying that I'm looking to keep it that way.
> > Bill, functional iterators are just fine, but my fear here is that no
> > one (outside of a native JS/LISP kind of implementor) will understand
> > how to use them quickly and well;
> C'mon. If that's not bullshit I don't know what is. The *language
> itself* is about to have functional-style iteration. Given that it's
> therefore idiomatic by definition, what's the cost to adding them to
> the collections interface?
> Alex Russell
> alex at jot.com
> alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dojo-contributors