Thanks for the feedback.
My response are inline:

On Tue, Aug 6, 2013 at 10:33 AM, Colin Alworth <[email protected]> wrote:

> Nice writeup. Comments/questions (since comments seem disabled in the
> docs):
>
>  * @Entry looks great - there has been some discussion in IRC about some
> way to do this for easier library wrapping code, but every direction we
> looked at with JSOs ended up with a little more cruft than we really wanted
> to see. Maybe worth mentioning that $entry doesn't just do exceptions, but
> also makes scheduleFinally behave as expected.
>

Will update the doc.


>  * Constructors - how is one supposed to new up an object that implements
> a specific interface without making your own implementation (and thus
> declaring new implementations)? Are we keeping the static-method-only
> restriction, or can we use new?


We are not planning a static-method-only restriction. However as these
classes are interfaces, you cannot just call constructor and that makes
sense because it is just an "interface contract" and we don't really know
how to really instantiate.
However, if the prototype attribute is set on @JsInterface, then it is no
longer only an interface contract; now it also represents a real js object
with a known constructor. In that case you can instantiate it with the
generated .Prototype class or Js.Object.create:
e.g.

  button = new Button.Prototype("Click");

or

  button = Js.Object.create(Button.class); // subject to change



> Similarly, how will these objects pass through the java/js barrier - are
> they to be a special class of objects in JSNI, allowed to be manipulated in
> plain JS instead of opaque objects, but still able to be instanceof'd?
>

Interface annotated with @JsInterface is special treated with compiler; and
guarantees the contract of a JS or Java object with disabling
optimizations, obfuscation and rely on prototype dispatch. That means they
will be real js objects unlike of the older JSOs.


>  * Java 8 support/requirement - currently the GWT release jars are
> compiled to target java 6 (according to common.ant.xml), so that they can
> be used in a project that supports either 6 *or* 7 (and of course newer).
> If this new code is used at all internally with java8-only features, does
> this mean that support will be *dropped* for both 6 and 7 instead of merely
> *adding* java 8 support?
>

I designed based on Java 8 and have a hard dependency on "default" methods.
But the solution should might need to work with 7 for a while if we can't
drop it by GWT 3.0. To achieve that I think we can do a pre-processing and
do some code generation for default methods (though not sure about the
details yet).


>  * (JSNI doc) primitives - why support for long, which JS VMs don't
> actually support, but not float/short/byte?
>

I only included long because as far as I know that is the only one that we
do emulation and changes some behavior.
But on the other hand it matter the least because we can't avoid
autoboxing. I'll drop that.
For the rest, int and double covers all autoboxing related issues so the
developer can just do a primitive cast.



>  * (JSNI doc) forEach - will there be a function/callback interface that
> will be autowrapped in $entry and bind to be passed in, or will this simply
> access a JSO that will be treated as a function?
>
>
If you are asking specific to Js.Array.foreach;
It doesn't need to be a JSO; you can pass a lambda expression. it will not
be wrapped with $entry (as it is a synchronous call and not actually an
entry point to the app).



>
> On Tuesday, August 6, 2013 2:24:47 AM UTC-5, Goktug Gokdogan wrote:
>>
>> I've shared an item with you.
>>
>> This is a design doc that describes a proposal for improving 
>> interoperability with GWT and javascript. The proposal provides some 
>> essential pieces to provide better and easier interoperability with JS while 
>> putting more complex scenarios (e.g. Web Components) and testability into 
>> account.
>>
>> Please take a look and provide us some feedback.
>>
>> Cheers,
>>
>>  - Goktug
>>
>> [image: Document] Nextgen GWT/JS Interop 
>> (Public)<https://docs.google.com/document/d/1tir74SB-ZWrs-gQ8w-lOEV3oMY6u6lF2MmNivDEihZ4/edit?usp=sharing>
>> Google Drive: create, share, and keep all your stuff in one place. [image:
>> Logo for Google Drive] <https://drive.google.com>
>>
>  --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
> ---
> You received this message because you are subscribed to the Google Groups
> "GWT Contributors" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to