On 17/05/15 15:29, Alex Harui wrote:
> I’m wondering why it isn’t sufficient for folks to iterate on ArrayList.source?

It is sufficient, but not ideal.

The syntactic sugar that ArrayCollection gives you makes it more pleasant to use, which (in my experience) means that people use ArrayCollection where logically ArrayList makes sense - i.e. where filters and sorts are not needed. In my experience this has lead to confusion (and that has lead to bugs) due to uncertainty about whether ArrayCollection is being used because that particular list might at some point have filtering or sorting, or simply due to the nicer API.

I don't know about any performance impact.

Gareth

BTW, thanks for working on this issue.  I’m sorry I didn’t see this
earlier, but having ArrayList now extend Proxy might result in performance
degradation.  Proxy has been very slow in my experience.

I’m wondering why it isn’t sufficient for folks to iterate on
ArrayList.source?

-Alex

On 5/16/15, 12:53 PM, "Harbs" <harbs.li...@gmail.com> wrote:

This is the discussion that I was referring to:
http://apache-flex-development.2333347.n4.nabble.com/Re-1-4-git-commit-add
-removeItem-to-IList-and-ListCollectionView-tp23272.html

On May 15, 2015, at 7:40 PM, Gareth Smith <garethdanielsm...@gmail.com>
wrote:

The discussion on this was in March 2013.
This is it, I think:


http://apache-flex-development.2333347.n4.nabble.com/ArrayList-itemUpdate
Handler-Change-td7774.html

It looks to me like the intention of the person who originally created
the
new ArrayList (Michael A. Labriola) was for it to be tested with the
rest
of the framework and then to replace the original ArrayList:

"Well, first thing I think is that we make sure everything still
internally
works in the framework. At some point though we will likely need to
document this and bit the bullet.

As someone who has been intimate with the framework for years I can
guarantee you that the order of events in something like combobox has
basically changed every other versions since flex 2, so we have
precedent
:) "

However, I think the simplest thing for me to do would be to patch both
classes with the Proxy stuff. At least that way I will not be making the
framework *more* confusing.

Gareth


On 14 May 2015 at 22:30, Harbs <harbs.li...@gmail.com> wrote:

The discussion on this was in March 2013.

On May 14, 2015, at 11:03 PM, Alex Harui <aha...@adobe.com> wrote:

I just looked quickly at the differences.  It appears that the second
ArrayList has different update event logic so it may be that it was
safer
to create a different ArrayList so we wouldn’t have to worry about
backward compatibility issues.

-Alex

On 5/13/15, 2:31 PM, "Gareth Smith" <garethdanielsm...@gmail.com>
wrote:

It looks like the second ArrayList was introduced by Justin Mclean in
this commit:


https://github.com/apache/flex-sdk/commit/621e4debe8cd46e9ec5a197256dc2b
6e
32fc47c3

I can't figure out why it was included though. Justin?

Thanks
Gareth

On 10/05/15 11:29, Gareth Smith wrote:
Hi,

I am putting together a patch for ArrayList to support
square-bracket
indexing and for-each loops, see:
https://issues.apache.org/jira/browse/FLEX-15159

I am confused by the existence of not one, but two ArrayList
classes:
the "original" one at mx.collections.ArrayList and another one at
org.apache.flex.collections.ArrayList.

Why are there two classes? Looking at their diff, I would guess that
mx.collections.ArrayList is newer: it has some additional
optimisations, and an additional toJSON() method.

I could patch both classes, but I would rather not introduce more
duplication that might become a maintenance burden along the line.

Thanks
Gareth


Reply via email to