Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Google starting to use Dart? Did they build a Closure (or GWT) to Dart compiler? [closed]

We are trying to decide if to use Dart for building a web app. We are looking for a technology that will stay highly relevant roughly for the next 5 years.

Now that EcmaScript 6 specs are around the corner (should be out by the end of 2014) we can't make up our mind if Dart is really here to stay for the long run.

This is because as far as we know there is a missing piece to Google original plan for Dash (now Dart). As Google originally planned in its leaked memo:

What about the existing code bases for large Google Apps? Won’t they have to rebuild everything to take advantage of Dash? The Dash Cross Compiler should be capable of taking typed Closure code (with some restrictions) and converting to Dash. Although the migration process won’t be fully automatic, it should make moving over to a Dash codebase somewhat easier.

Therefore, this is the reason for this question. Is there any effort to date from Google to build a Closure (or GWT) to Dart compiler or translator? In addition, do you know if Google started using it for any existing or new production web app?

In other words, our worry is that Dart will only be a language that is there to fill a transition period and to push Javascript to iterate a bit faster, but as soon as the major browsers will support ES6 (and ES6+) it will be abandoned.

We don't want to start any arguments on the pros and cons of Dart, we just need some factual info that could help us in this key decision. Thanks

like image 729
Durden81 Avatar asked Jul 03 '14 11:07

Durden81


1 Answers

So far I have been mostly developing with GWT (scientific web-apps) but recently I also started to work with Dart.

Google is heavily invested in Dart (look at all the I/O talks) so I can't really imagine them dropping it. Also ES6 will solve some problems (modules, classes, etc) but it still is Javascript with all its problems and drawbacks.

While working with GWT there were two aspects, which make developing large scale web-apps actually feasible:

  • structured language (Java) & static types
  • compiler

1.) Java is a statically typed language and thus allows you to easily catch errors during development. Furthermore it is much easier to refactor your code when your IDE understands the structure of your code. The same advantages also apply to Dart.

2.) Both the GWT compiler as well as the Dart compiler are quite sophisticated They can do global optimizations (https://plus.google.com/111739836936169749229/posts/DSUgfWefyR3) and tree shaking (https://plus.google.com/110412141990454266397/posts/VK8URgZiLbS). If you develop web-apps with a 100.000 LOC, this is quite important and crucial.

Dart has one big advantage over GWT concerning the development story: Dartium has the DartVM baked in. This makes development and iterations as convenient as with Javascript (GWT has SuperDevMode but that's not as fast).

You can checkout Java2Dart which could be used to transpile GWT code to Dart

like image 189
Ümit Avatar answered Oct 24 '22 23:10

Ümit