Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If Dart, at first blush, looks familiar, then we've done our job. :) We freely admit that our job was not to make the world's most pure or esoteric language. Dart is a tool to get real jobs done and to be easy to use for a wide range of developers. Our hackathon experience shows that our learning curve is low.

That being said, if you poke around and try the language, you'll see quite a few significant improvements and exciting features. I wouldn't say it's "slightly better", I would say there are some significant enhancements.

Some significant improvements include:

* Isolates for shared-nothing concurrency. Shared-state threads are error prone.

* Optional types. You don't always need to prove the entire world is validated by some ceremonial type checker. Web programming especially is a workflow where you want to "write some code, hit reload" and iterate as fast as possible. Also, sometimes you just can't express what you want with your type system. Optional types is a way to say "I was going to cast to Object anyway, so let's dispence with the pleasantries and just use var."

* Everything is an object. No more "some things are primitives, some things aren't."

* Arbitrarily sized integers. 'nuff said.

* Not everything has to be in a class. Dart has top-level functions. This makes utility libraries significantly easier to use.

* A package manager as a native part of the ecosystem. This encourages 3rd party developers to share code early.

* Significantly faster start up. Go ahead and print out all the classes that are loaded when you run a simple Hello World program with the JVM. We'll wait. :)

* (related to the above) All Dart programs actually start running with main(). Turns out, this is not the case in JVM, due to how statics are initialized.

* Snapshots. Load code and libraries from a serialized binary heap. Significant startup performance improvements.

* Compile-time constants. These are canonicalized, and make for easy way to share data across isolates (they are immutable, for instance).

* Named optional parameters, with default values.

* All exceptions are uncaught.

* Throw any object. So you can throw "This is a crazy one-off error"

* Dartdoc comments can have markdown. This is awesome. :)

* A file can have a mix of classes and top-level functions.

* Lexical closures! (no more need for anonymous inner classes)

* Operator overloading.

* Method cascades. See http://www.dartlang.org/articles/m1-language-changes/#cascad...

All that really matters is "Are real developers more productive and having more fun? Are real developers launching more exciting apps?" That is the true test for Dart or any web language. Our experience is that evolutions, not revolutions, are a successful way to adoption.

Disclaimer: I'm a long time Java user and I have respect for the platform. I've written books on it, and launched many apps with it.



I smell comparison to Java in every point. How about comparing to Javascript, in whose domain Dart intrudes? Or, even better, CoffeeScript? ;)


Dart provides a complete "Batteries included" solution, i.e. Dart IDE, package manager, core libs, etc. Optional typing enables IDE's to maintain richer knowledge about your code, enabling proper intelli-sense and refactoring support. Dart IDE's intelli-sense is smart it can even infer types inside string literals:

http://news.dartlang.org/2012/08/dart-editor-improves-on-cod...

var v = document.query("input#id");

v. //brings up intelli-sense for InputElement

You can also debug natively in Chrome or inside the Dart IDE. JetBrains are also developing their own plugin for Dart: http://plugins.intellij.net/plugin/?idea&id=6351

It also transpiles to JS (like CoffeeScript) but also includes a Dart VM which contains innovative features like Snapshotting for instant start-up times.


The original post was about a "slightly better java", so you're right, I tried to enumerate some features that might be interesting to a Java developer.

I really don't like X vs Y stuff (too many subtle and contextual issues), so I'm just trying to help the original commenter dig a little deeper.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: