Now, if you think it's bad that Chrome is trying to entice browser app developers with powerful feature sets, that seems like a related but different complaint.
It's possible I'm unclear on the scope of the Open Web movement. When it refers to web technologies, does it mean technologies employed in the service of presenting web pages (i.e. everything you can do with javascript, html, css, etc.), or any technologies that a browser serves as a platform for? Because the latter seems like a wider scope that encompasses more than just web pages.
There Chrome has broken video recording three times the past year by pushing untested code, it's not possible to permanently disable it and the last change actually requires users to click both the Flash allow box and the WebRTC allow box!
That's without even mentioning the bug that if a user doesn't notice the second allow and refreshes the page, like every user does, the Allow box is never shown again.
http://www.cvedetails.com/vulnerability-list/vendor_id-53/pr...
The permission model on packaged apps is completely different, and allows for APIs that have a lot more power (raw USB, TCP access) and as such, it's hard to find a way to expose them to the open web without permission bar overload. :/ I'd personally love to find a way to bring some of the powerful APIs that browsers are developing and exposing them to the web, but it seems like we're not there yet.
For Dart.. think of it as another compile-to-JS language that was designed for large app authoring & maintenance productivity. Its performance as compiled JS seems to be pretty good already so you can target all modern browsers with Dart apps already.
But, ultimately, I'm an open web kind of guy. My money's on APIs that the web shares and I see compatibility across the web as the characteristic that drives its power and reach. Chrome's working on a lot of APIs for the open web platform (see my links above) and is constantly working with other browser vendors to get feedback, buy-in, and identify the best APIs that the web can share.
It's essentially not much different from Windows having Windows-specific APIs for downloadable programs. "Chrome Packaged Apps" are the downloadable programs of Chrome OS.
Doesn't the same logic apply to Mozilla's asm.js?
The parent comment said that asm.js was a subset of JavaScript. You said "no", but none of the things you said contradict that. asm.js is, right now, a subset of JavaScript. Which, of course, is its entire raison d'être.
What really does worry me is the ugly things that will be necessary to make asm.js genuinely viable as a platform. Yes, some proposals will have general utility for JavaScript, but many will not. And some will be downright dangerous. For example, how are you going to address pthreads compatibility, which e.g. Epic is saying they need?
I'm afraid your statement really wasn't correct. asm.js is both syntactically and semantically JavaScript. OdinMonkey is a pure optimization; any observable divergence in behavior (other than timing, which of course all engines are allowed to do) is a bug that will be fixed. The fact that SpiderMonkey uses a prolog directive (not a keyword), which is also of course valid ECMAScript, to trigger a different kind of optimization does not change the fact that it is a valid implementation of JavaScript.
I don't really want this to turn into a back-and-forth, but it's unfortunate that this has devolved into outright accusations of dishonesty.
And really, I'm far more concerned with the future plans, particularly with regard to things like multi-threading APIs. I don't see how those can be incorporated in a way that supports asm.js as an easy target for existing code while not causing it to diverge from JavaScript as used in the browser.
The fact is that asm.js runs and as of recently, does so performantly in Chrome which does even implement the aot optimisations in odinmonkey.
To my mind given the above fact it seems perfectly reasonable to make the assertion that asm.js is just javascript.
So, my concern here is that asm.js will either be forced to diverge from JS to make it generally useful, or it will need to add APIs to JS that are not appropriate outside of asm.js. If it gets to that place, then I feel that the compromises necessary for asm.js were a waste, and it would have clearly been better to just introduce a new IR that wasn't bound by the constraints of asm.js.
The "use asm" is totally optional functionality wise.
I am not sure I understand what people try to prove or imply when they say that.
OdinMonkey takes an extremely limited statically typed language with an almost non-existent runtime library as an input, checks the types and pipes fully typed IR further through the existing backend (IonMonkey). Does it come as a surprise to anyone that this can be implemented quickly?
Dart is a new language / VM and it's not standardized.
So the logic is definitely not the same.
The performance of the generated JavaScript is okay. Typically, it's somewhere around 75% of the performance of handwritten JavaScript and it's still getting better.
Those -25% may sound like a big deal, but it's comparable to the performance from JS engines from last year.
The Dart FAQ says:
Q. Is Dart going to divert community effort from JavaScript-based web development?
If people like Dart and use it, then to a certain extent, yes, but isn't this true of any improvement to existing web development? Nothing is zero-effort to learn or 100% back-compatible to legacy browsers, so people use both new and old. You might look at it this way: Google is putting significant effort behind both Dart and JavaScript, choosing to develop Dart while at the same time using JavaScript extensively, and working on JavaScript tools, implementation, and language spec. We're doing both because we think Dart is worth it.
Server-side web programming finds room for many languages: does Python divert effort from Perl, and does Java undercut C++? Again, to a certain extent, yes they do, but people generally consider that a healthy situation, better than if we all used a single programming language. Multiple languages have allowed for faster change than any single language has achieved through a standards process. Furthermore, languages coexist in different niches: does Groovy really compete directly with C++? People face different engineering tradeoffs and choose different languages to meet them. Ultimately, we think client-side developers should have this kind of flexibility.
Q. Is Google planning to put Dart under the control of a standards body?
Yes, we hope to. Once Dart reaches a certain level of maturity and acceptance, we expect that a standards process will be the next step.
As for the various APIs you describe above, those are all for packaged apps, which really have nothing to do with the web except that they happen to run inside Chrome. It's like complaining that iOS in-app purchases go through Apple, or that Gnome has Bluetooth support. (Or even that Firefox extensions don't work in Safari.)
Not according to the benchmarks they give:
http://www.dartlang.org/performance/
Dart VM (Dartium) is about 2x as fast as Dart2JS (which is around 80%-90% of JS).
(Remember that you can write server-side software with Dart, too, so the VM can exist for that purpose without being some evil scheme to eliminate Javascript. Not that I would mourn the passing of Javascript :)
I'm not sure. If that was the case, I don't think they'd put a hot ass team (including Lars Bak IIRC) on the Dart VM and spend millions on it.
I believe Google would very much like Dart (the VM) to succeed, but they know that realistically it can not for now, and so they invest in the JS translation in order for it to be a credible player.
As you mention, one way that Dark can make a dent, though, is on the server side. It's a decent dynamic language, that's an order of magnitude faster than Python/Ruby. With enough library support, it can get places that even node, tied as it is to the async callback model, might not. A decent web framework, for example, could have Dart see a lot of adoption.
That said, it's still too early to tell -- it's not even out of beta yet.
Furthermore, the compiler is responsible for resolving the dependencies your main program uses ("tree shaking" to remove stuff you don't actually use [1]), so there has to be a compiler even if your browser had a Dart VM built in.
[1] http://blog.sethladd.com/2013/01/minification-is-not-enough-...
I use Dart because it allows me to organize and test my code in a way that is very inconvenient with Javascript. Any speed improvements or IDE support is incidental, I have not yet had any speed problems in Javascript and I don't use their IDE :) The type-checking, library system, and the language itself is wonderful, though.
We're going to look back on this in 5 years and kick ourselves over letting Google do this. I hate to say it, but Google is now the biggest threat to an open web.