Kirrill,
I did not suggest to *convert*, but *map*. That means that if/when a 
JSInter-oped class is exported into the JS Engine (let's say V8) , the JS 
developer will see plain old js arrays, so s/he can work with them as they 
have been for ages. When Java/JsInterop developers work with the same 
structure, they can chose to view it as java.util.ArrayList, java array or 
some other java.util.Collection, thus using familiar Java APIs. It is the 
same structure in the JS Engine memory, but viewed differently. But no 
conversion involved.

On Monday, June 6, 2016 at 9:36:00 AM UTC-7, Kirill Prazdnikov wrote:
>
> Let me try to explain the issue better:
>>
>> All we need is the JsInterop to map  an List (or Java array) from the 
>> Java world into plain array in the JavaScript world. *Transparently**.*
>>
>
> I do not agree.  About transparency. Conversion form Java List (see Linked 
> list)to plain Js array is a serious performance and garbage operation. 
> You have to create a new array on JS side and iterate the list and copy 
> its values to the array. 
>
> Instead of that you may expose any interface to JS from java using new 
> JsInterop. And use the interface in JS side. 
>
> What about the fact that  Java list contains (T extends java.lang.Object). 
> What will you do with Java-kind objects in JS world ? 
>  
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to