Hacker News new | ask | show | jobs
by cromwellian 3519 days ago
GWT has ungone a similar rewrite and we now have a new compiler called J2CL (Jackal) which produces human readable ES6 modules incrementally transpiled on a per-Java file basis, with Closure JsDoc types. With optional Closure Compiler optimization, code-size beats GWT by 10%. Both GWT and J2CL share a new rich JS interop system, and a new Elemental2 code generator can read Closure or Typescript files and produce Java interop classes. The interop can even be type safe, so that you can have compile time checks against third party JS libraries, or runtime checks (instanceof, class cast exceptions)

J2CL gets rid of all of the complexity in GWT (generators, linkers, Widgets), in favor of standard annotation processors, external build systems, and straight up integration with JS ecosystem libraries.

The idea of J2CL was to reduce lock in and make it more of a natural fit with the existing ecosystem. The entire GWT SDK has been nuked for J2CL, there's just the JRE, Guava, and whatever else you want to add, there is no "com.google.anything"

Obviously, this adds a porting overhead when it's released, but some people will likely backport GWT's SDK to it for migration.

This was telegraphed here: http://www.slideshare.net/CristianoCostantini/gwtcon-2015-be... https://qconnewyork.com/ny2016/ny2016/presentation/j2cl-futu...