> end goal is wide use both inside and outside the company
I agree fully. I would just add that, just in terms of salaries they've paid to Google employees working on Dart, they've spent millions, which they won't get back from by selling Dart. They probably have a compelling internal reason for doing this. They win if external developers adopt it because useful libraries will be written.
> they've spent millions, which they won't get back from by selling Dart
Yes, I think everyone understands today that languages don't directly generate revenue.
> They probably have a compelling internal reason for doing this.
Off the top of my head:
* If it makes Googlers more productive writing apps in Dart, that directly saves Google money. We, obviously have some very large JavaScript applications (gmail, maps, docs...) and we spend a ton of engineering time on them. If we can make those engineers more productive, that's a huge savings.
* If Dart succeeds externally, that's more third-party code that Google can then use for its own projects, so that directly saves us money.
* If Dart makes other web developers more productive, that makes the web bigger. A bigger web means more people spending time on it and more people doing web searches, which ultimately goes right back to Google. Google is happy when the web gets bigger.
Your first reason is the most compelling and what JavaScript developers might want to consider. My own experience is that I am much more productive writing code in Dart and then converting it to JavaScript. Why?
* Autocompletion (intellisense)
* Refactoring
* Use types and catch errors before runtime. Types are optional, although I don't know why you wouldn't use them unless you are pasting in some JavaScript code and running it as Dart. Hand converting JavaScript to Dart is fairly easy because types are optional.
* Quick turn around time in the "change code, set breakpoint, run code, stop at break point" cycle.
* Calling native JS code is painless. Libraries that are currently not available as Dart, such as three.js can still be used.
* Project organization is fairly automatic.
* Code analyzer - this one is my favorite. The analyzer will tell me if my change causes a problem in another file. It runs in the background, like C# does.