On Tue, Jun 9, 2009 at 1:02 AM, Ray Cromwell <cromwell...@gmail.com> wrote:

>
> In particular, I use my own JsArray/JsMap implementation to avoid JRE
> collections in GQuery. Perhaps rather than patching JsArray, there
> should just be something like FastArrayList and FastMap which do not
> implement JRE Collections, but are nothing more than wrappers around
> JS arrays and objects for storing arbitrary Java objects. I suspect
> this is what motivates the patch?


I am concerned about adding too many classes with redundant functionality. I
see the point for FastMap, but what would be the advantage of FastArrayList
over ArrayList if it is still a wrapper? ArrayList seems to be pretty good
already. If we want to trim it down some more, we are basically back to
JsArray.

To address the compatibility concerns, what about

1. Add JsArrayList<T> that basically is identical to JsArray, but not
limited to JSOs
2. let JsArray<T extends JSO> extend JsArrayList<T> and deprecate it

Stefan



>
> -Ray
>
>
> On Tue, Jun 9, 2009 at 8:16 AM, John Tamplin<j...@google.com> wrote:
> > On Mon, Jun 8, 2009 at 6:22 PM, Stefan Haustein <haust...@google.com>
> wrote:
> >>
> >> I'd like to submit a patch (see below) that changes  "JsArray<T extends
> >> JavaScriptObject>" to "JsArray<T>"
> >>
> >> Motivation:
> >> Support more lightweight code in places where we depend on Javascript
> >> anyway.
> >> In particular, I would like to remove the dependency on LinkedList in
> >> AsyncFragmentLoader in a follow-up change.
> >>
> >> I have verified that this change does not introduce any new test
> failures.
> >
> > What does it mean to store non-JS values in a pure JS array?  What sort
> of
> > things do you want to store that aren't JSO's but would reasonably work?
> >
> > --
> > John A. Tamplin
> > Software Engineer (GWT), Google
> >
> > >
> >
>
> >
>


-- 
Stefan Haustein
Google UK Limited

Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
9TQ; Registered in England Number: 3977902

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to