2 ms·
The asm.js comparison is a false equivalence. It is not possible (without explicit effort, e.g. checking the UA string) for Web authors to ship asm.js that does
by pcwalton 13y ago
The asm.js comparison is a false equivalence. It is not possible (without explicit effort, e.g. checking the UA string) for Web authors to ship asm.js that does not work in Chrome, because asm.js is just JavaScript. With Dart, Web authors may end up not shipping the JS fallback, or not testing it, thus locking the Web into Chrome. That is why turning on the Dart VM for Web content would be a problem.
- cromwellian 13y agoIt's a false equivalence in theory, but in practice, I don't think so. Realistically, how many developers are not going to ship something that doesn't work on Firefox and Safari, especially, Mobile Safari? Especially when the tools to do this are trivial and automatic. It's much harder to write cross-browser CSS, with full GPU compositing, and responsive layout than it is to compile Dart to JS. What is the incentive for the developer not to do is and leave a huge chunk of marketshare on the table with little effort? Stuff like prefixed-CSS is a far far worse threat to the Web than a DartVM.
- pcwalton 13y agoOf course people won't ship something that doesn't work cross-browser today. But by that logic, no proprietary feature is worth worrying about. Consider a hypothetical future in which Chrome had 90% market share: as a Web dev, would you bother shipping or testing the JS fallback? History tells us what will happen.
- cromwellian 13y agoIf Chrome gets 90% marketshare, there'll be other problems besides Dart. History also tells us that even if all vendors adhere to standard specs, there will be implementation differences and bugs that still require developers to write browser specific code and fixups. Again, I'm not disagreeing that there is a danger of fragmentation, but this won't happen because of Dart, but because of other forces. The criticism over the DartVM is being blown way out of proportion. The best defense against any of this happening is not to protest Dart, but to make sure the browser market is competitive.
- ahoge 13y ago>With Dart, Web authors may end up not shipping the JS fallback Why wouldn't you? Minifying Dart or compiling Dart to JavaScript is basically the same. You invoke the very same command line tool just with different switches. Why would you do one thing in your build/deploy script but not the other? Especially if doing so makes it incompatible for a significant chunk of your users. Most people won't even drop a 5% chunk (e.g. something like IE8). >or not testing it [in other browsers] I don't see how that's specific to Dart.