Hacker News new | ask | show | jobs
by pohl 4370 days ago
Has there been much internal dogfooding, such that some external-facing thing I use is really powered by JavaScript that came out of dart2js?

If I'm using GWT, should I be thinking about using Dart instead?

2 comments

> Has there been much internal dogfooding

Yes. We on the team, of course, use Dart heavily. My day job is working on pub, the package manager for Dart, and a slew of other libraries, all written in Dart. Our API[1] doc site is written in Dart.

Likewise, we have an increasing number of internal customers who give us the kind of feedback you only get from someone who isn't obligated to see your project succeed. :)

Obviously, a bunch of customers we can't talk about, but I can say that Google Elections and Google Fiber use Dart. Google has an internal sales tool also written using Dart and Angular.dart.

[1]: https://api.dartlang.org

re: GWT. GWT is still actively developed and making progress. I just talked with some GWT team members at I/O, and they're adding better JS-interop (like we are), incremental compilation, and are looking at web components support. One thing we talked about that would be nice is GWT-Dart interop, (if we get everything else done).

I'm biased, being on the Dart team, but I think Dart is a much nicer language that Java, so I would choose Dart for a new project. GWT might still be a good choice though if you have a large existing investment in Java that you can repurpose in the client. Many enterprises have hundreds of thousands or millions of lines of Java code that aren't going anywhere anytime soon.

So, should you think about Dart? I guess that depends on how ready or willing you are to migrate your code away form Java. If you were thinking about rewriting in JavaScript, then I'd definitely say consider Dart. If you're happy with Java and GWT, then you can keep going that direction.

Although it won't fix all the language boilerplate problems, we are also adding Java 8 support to GWT shortly, which does let you go from this nastiness :)

button.addEventListener("click", new EventListener() {

  public void onEvent(Event e) { Window.alert("Hello"); }   
});

to this:

button.addEventListener("click", e -> Window.alert("hello"));

Awesome!