2 ms·
I was excited about Dart, until I saw how many lines of code the JavaScript output was for one of its simple examples. And then I completely lost interest when
by TazeTSchnitzel 14y ago
I was excited about Dart, until I saw how many lines of code the JavaScript output was for one of its simple examples.
And then I completely lost interest when I started structuring my code well, and realised that I didn't need it as much as I thought.
- ahoge 14y agoThe output is more optimized now. However, there is a one-time cost for some of the language features. So, it grows kinda quickly initially. There is some sort of bump, basically. Thanks to "tree shaking" (=dead code removal), you'll reach the break-even point fairly quickly though. You can use massive libraries, buy only those pieces you actually use get included in the final output. For example, the last JS app I wrote is about 80kB (minified and compressed). jQuery alone took about 33kB of that. How much of jQuery do I actually use? I'd guess it's less than 20%. So, even with that initial overhead, a Dart version would be probably a bit smaller.