4 ms·
- huge js file size (2MB+ easily) - obscure hard to use js interop facilities - very slow js interop - broken js minification (ignored tickets)
by shadowmint 13y ago
- huge js file size (2MB+ easily)
- obscure hard to use js interop facilities
- very slow js interop
- broken js minification (ignored tickets)
- no older browser support
- ridiculously long compile times
I honestly welcome anyone who uses dart in a production environment to link to a blog post or explain how they worked around these, because we found they made using dart2js such a nightmare we gave up on it.
I speak only for my own experience, perhaps others have different experience, but no one seems to have good things to say about the experience working with it that I can see...
(amusingly, from your link: 'Does not work in Firefox (neither Stable nor Nightly), but works in Chrome Dev and Safari.')
- skybrian 13y agoThis isn't production, but I found dart:js to be pretty reasonable for interop with CodeMirror and a Chrome extension API. (I did find it better to send a batch to a wrapper function rather than making JavaScript calls in a tight loop, though.)
- michaelwww 13y agoThis comment had me scratching my head. Right off the bat, if you need to run on older browsers, don't use Dart. It's not a secret. Use TypeScript instead. If you need to make a lot of calls into existing JavaScript libs to the point where speed reduction is noticable, don't use Dart. What's so hard to use about js interop? How is it obscure? Throwing out 2MB file size without stating the LOC of the original Dart source is meaningless. I've never noticed long compile times. I do my development in Dart, which runs almost instantaneously, then when all is well, I do a build which compiles and minifies which is reasonably fast. The only thing I can figure is that you're using Dart Polymer, which last I checked, was still in development. My single page app is approaching 10,000 LOC and minifies to about 295K, which is hardly too large. I'm using Dart as a straight replacement for JS and not trying to use the advanced language features, which my explain my more positive experience.
- mraleph 13y ago> (amusingly, from your link: 'Does not work in Firefox (neither Stable nor Nightly), but works in Chrome Dev and Safari.') It's most likely problem with polyfills, not with dart2js compilation problem, I have not tried to debug it yet.
- mraleph 13y agoFixed. It was purely my bug: I was relying on a certain ordering of propChanged() callbacks, but it does not seem like Polymer.dart guarantees any. Now it works in Chrome/FF/Safari all the same.