4 ms·
Browsers should compete on performance. As long as dart2js outputs efficient JavaScript (current benchmarks: https://www.dartlang.org/performance https://www.da
by sethladd 13y ago
Browsers should compete on performance. As long as dart2js outputs efficient JavaScript (current benchmarks: https://www.dartlang.org/performance https://www.dartlang.org/performance) so that Dart code runs well on browsers without the VM, I think it's fine if some browsers run Dart more efficiently than others. Consider Dart VM as an accelerated way to run Dart code which otherwise runs fine in other browsers.
To be very clear, Dart runs across the modern web when you compile it to JavaScript, so it's not a language that works only in one browser.
- pcwalton 13y ago> To be very clear, Dart runs across the modern web when you compile it to JavaScript, so it's not a language that works only in one browser. What stops sites from shipping Dart only and not shipping the JavaScript?
- RyanZAG 13y agoNothing. Expect some sneaky deals on special Chrome apps in the future that will convince popular apps (with a nice sum of money) to have their hot new app being 'dart exclusive'. It's the obvious end game that sounds cynical if not for the fact that every single company in that position has historically abused that position.
- lukesandberg 13y agoThe same thing that prevents sites from shipping sites that only support particular browsers today.
- pcwalton 13y ago> The same thing that prevents sites from shipping sites that only support particular browsers today. That's right, and historically encouraging authors to use vendor-specific stuff by making that the easiest thing to do, whether it be filter:progid:DXImageTransform, WebKit prefixes, ActiveX banking plugins, or what have you, has been bad for user choice. To give just one example, WebKit asked authors not to rely on WebKit prefixes, but they did and now we're in the situation where just yesterday I wasn't able to use clippercard.com on Firefox for Android because the design was so broken as to be unusable. :(
- _greim_ 13y agoThey'd lose a huge chunk of traffic, but otherwise nothing would stop them and someone is eventually bound to try it.
- rtpg 13y agonothing, it's their loss. But seeing how you can get JS support "for free", then there's no reason not to have both available.
- pcwalton 13y agoIt's also possible to add other vendor prefixes "for free", but that didn't stop WebKit-only prefixes from appearing all over the mobile Web. Developers do what is easiest.
- sethladd 13y agoWhy would a site want to target only Chrome? If your site has a URL, I think it's of the site's best interest to target many modern browsers and provide a graceful upgrade/download experience.
- pcwalton 13y ago> Why would a site want to target only Chrome? If your site has a URL, I think it's of the site's best interest to target many modern browsers and provide a graceful upgrade/download experience. I agree that sites should do it, but developers have not done this in the past. If Chrome has a commanding market share, history says that developers will not bother to target other browsers.