263 karma · joined April 22, 2009
Here's the Dart code for Delta Blue: https://github.com/dart-lang/benchmark_harness/blob/master/e...
Here's the JavaScript code for Delta Blue: https://code.google.com/p/v8/source/browse/branches/bleeding...
I see a JS class for Constraint, and a Dart class for Constraint.
I see a JS class for Strength, and a Dart class for Strength.
This goes on and on. In fact, I see a top-level function for chainTest() in both JavaScript and Dart.
Thanks for using Dart!
The Dart VM is 2X faster than V8 on a few benchmarks already. Check out https://www.dartlang.org/performance We've still got a bunch of work to do, but the initial results are encouraging.
I talked to our VM engineers, and they mentioned that the Benchmarks Game does not perform a warm-up before it runs the benchmark. This affects the Dart performance, because the Dart VM does not yet have on-stack replacement (OSR). Both Java and V8 have OSR so they perform better in the Benchmarks Game.
If you look at Dart's benchmark harness, https://github.com/dart-lang/benchmark_harness, you'll see that we perform a small warm up before we start measuring. It would be cool if Benchmarks Game did a warmup, too.
We plan to implement OSR but it's not there yet.
[disclaimer: I work on the Dart team.]
1) We have unit tests and mocks built-in. Check out https://www.dartlang.org/articles/dart-unit-tests/
2) We have JS-interop. Check out http://www.dartlang.org/articles/js-dart-interop/
3) We have tutorials for Web UI. Check out http://www.dartlang.org/docs/tutorials/
Hope that helps!
* Dart compiles to JavaScript, Silverlight did not. * Dart is actively being developed, Silverlight is not. * Dart does not require any plugins, Silverlight did. * Dart natively supports the DOM, Silverlight did not.
[disclaimer: I work on the Dart team]
While I do believe our Dart/JavaScript interop story will continue to be refined, I do want to point out that the days of javascript: URLs and eval are nearly over. The Web is getting a stronger security model through CSP [1] (content security policy). New restrictions put in place by CSP include turning off eval, new Function, inline JavaScript, and more. This is a very good thing, because it reduces the attack vectors for XSS and more.
[1] http://www.html5rocks.com/en/tutorials/security/content-secu...
[disclaimer: I work on the Dart team]
You might be interested in checking out http://pub.dartlang.org which is our repository of Dart packages. Meanwhile, we're still in beta, so I hope to see more projects when we hit 1.0.
Yes, one of the long term goals of the language is standardization. The project is open source, we have external committers, and we've taken numerous patches. Pull Requests welcome!
Thanks for the question!
We released Dart as a Technology Preview last year, which means we released very early in the project's life cycle. We've been collecting feedback and updating/refactoring the language, libraries, and tools. We've recently started releasing Milestone builds, which are essentially beta builds of the SDK and tools. The language does not anticipate backward breaking changes (but we still anticipate adding features like mixins). The libraries are currently undergoing changes, driven by feedback from the community and internal users.
The question if you should use Dart now depends on when you need to ship your projects. Too much will be changing to bet on it to ship your project in Q1 2013. However, my impression is that if you're shipping in Q2 or after, Dart should be a good bet.
The Dart community and team is standing by to help if you have any questions or concerns. You can find us at misc@dartlang.org, dartbug.com, and Stack Overflow.
"In general, Gmail supports the current and prior major release of Chrome, Firefox, Internet Explorer and Safari on a rolling basis."
I interpret this as IE10 and IE9, at least for Gmail.
Good question!
The language does not anticipate backwards breaking changes (modulo any bugs we find in the spec), though we expect to add features like mixins.
The libraries are going through changes now, especially with the introduction of the new Streams API: http://news.dartlang.org/2012/11/introducing-new-streams-api...
The time is good to check out Dart and let us know what features you need for your next commercial project. However, with the libraries evolving right now, I probably wouldn't use Dart for something I need to ship in Q1 of 2013.
We love feedback, and there are a ton of features what work today (package manager, compiler to JavaScript, editor, etc) so we hope to hear from you soon :)
Also, performance is looking good: https://www.dartlang.org/performance/
* Dart has top-level variables and functions, Java does not. * Dart has optional static types, Java does not. * Dart programs start at main(), Java does not (see static initializers) * Dart has factory constructors, Java does not. * Dart has true lexical scope and nested functions, Java does not. * Dart doesn't need to be compiled into bytecode, Java does. * Dart's classes have implicit interfaces, Java does not. * Dart has auto generated getters and setters for fields, Java does not. * Dart has one-line function syntax, Java does not. * Everything in Dart is an object, Java has primitives. * Dart has only library privates, Java has public/protected/package/private. * Dart starts quicker than Java.
In all fairness, both Dart and Java and JavaScript use { } and ;
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.
From my understanding, ActionScript is a gradually typed language. Contrast with Dart, which is optionally typed. In Dart, static type annotations do not affect the runtime semantics of the code. In ActionScript, the types do affect the runtime semantics.
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.