Saturday, October 24, 2015

Re: What is j2cl?

Thank you Thomas for this answer! This is great!

Replacing JRE emulation with Closure Library (java.util.HashMap => goog.structs.Map, java.util.Set => goog.structs.Set, etc.) would eliminate the need for JRE emulation and protect us in case Oracle wins in court. I guess that in this case Closure Library will need to be extended with some methods and classes in order to provide functionality which is present today in JRE emulation library. But this can also be done later (j2cl v2.0).

Marko

On Saturday, October 24, 2015 at 12:31:40 AM UTC+2, Thomas Broyer wrote:


On Saturday, October 24, 2015 at 12:14:17 AM UTC+2, Marko wrote:
I see the term "j2cl" comming up in several threads connected with GWT 3.0. What does it mean?

I speculate that this is a "Java-to-Closure-Library" transpiler, which would be GREAT, because you wouldn't depend on JRE emulation library anymore and GWT 3.0 would be safe from "Oracle copyright lawsuit nonsense". Additionally you could integrate JavaScript Closure Library code with Java code transpiled to Closure Library and it would use the exactly same class library... I guess also that Google would profit from such a transpiler in Google Inbox and other similar projects...

I hope I am not speculating too much into the Google's trade secrets and that this post will not be deleted because of this... :-)

You're almost right (Googlers will correct me if I'm wrong).

j2cl stands for Java-to-CLosure. It's not much about the Closure Library but rather the Closure Compiler. It's a transpiler from Java to Closure-annotated ES6 (there are a couple videos about this from the GWT Meetup earlier this year: https://www.youtube.com/playlist?list=PL1yReUCGwGvrqscLu1EAyYRPrr0ceEHLE ), type annotations will help the Closure Compiler prune unused code to further optimize the produced JS.

But it won't free us from the JRE emulation library.

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment