5 ms·
Dart was basically Google's CoffeeScript, a compile-to-JS language that was supposed to sand off JavaScript's rough edges while still running in any web browser
by cwyers 9y ago
Dart was basically Google's CoffeeScript, a compile-to-JS language that was supposed to sand off JavaScript's rough edges while still running in any web browser with JavaScript support. It didn't catch on, and one of the reasons is that this is right around the time when CoffeeScript started to fall out of favor, JavaScript got a lot of new features that alleviated enough of the pain points that people didn't want to deal with debugging code that was compiled into JavaScript, and stuff like Emscripten and TypeScript moved into the space. So it feels like the state of JavaScript has moved on by where Dart was, it still have enough JavaScript influence that the JavaScript haters don't really want to touch it, it's not enough like JavaScript for JavaScript enthusiasts to really like it, and there's no community around it so if you want to work in it and Google hasn't provided a library or framework that does what you want you need to roll your own.
- nevir 9y agodart2js is a very small sliver of what Dart is.
- cwyers 9y agoThe original Dart announcement was a presentation entitled "Dart: A Structured Web Programming Language." Dart has evolved beyond that mostly by necessity; people weren't adopting it for web programming, and so if it was going to survive, it needed to adapt. http://gotocon.com/dl/goto-aarhus-2011/slides/GiladBracha_and_LarsBak_OpeningKeynoteDartANewProgrammingLanguageForStructuredWebProgramming.pdf http://gotocon.com/dl/goto-aarhus-2011/slides/GiladBracha_an...
- nevir 9y agoRight, but that legacy isn't a great reason to hate on what Dart is now
- cwyers 9y agoProgramming languages have killer apps that define how people engage with them. Perl was "instead of using shell scripts with sed/awk you can use a 'real' programming language." Java was "here's C without so many footguns." C# was "here's Java without having to deal with Sun/Oracle." Dart was supposed to have a killer app around web development and didn't make it. Even something like Flutter has incremental improvements over stuff like React Native, Xamarin Forms and other cross-platform UI toolkits. There's still no killer app there.
- dragonwriter 9y ago> Dart was basically Google's CoffeeScript, a compile-to-JS language that was supposed to sand off JavaScript's rough edges while still running in any web browser with JavaScript support. Actually (and this is ultimately the reason for a lot of the political resistance), Dart was imagined as a replacement for JS, with an in-browser Dart VM as the ultimate preferred target for front end. Dart2JS was overtly a bridge until other browser vendors signed on by adopting the DartVM or implementing their own. (It was used even for Chrome, because Google wanted to avoid Chrome-only or “runs better in Chrome” Dart code on the public web, but that was insufficient to quell political resistance.)
- kllrnohj 9y agoYes but it means that much of Dart was designed around the limitations inherent in JS, which means you get stupid stuff like the int primitive being: "Integer values, which generally should be in the range -2^53 to 2^53" https://www.dartlang.org/guides/language/language-tour#numbers https://www.dartlang.org/guides/language/language-tour#numbe... Or a completely lack of parallelism, which is an omission that grows ever larger as even mobile SoCs are flirting with double-digit CPU cores. So you got all the downsides of JS with none of the community/libraries of JS and with performance promises that only manifested with a custom build of Chrome. That's not a happy place to end up. If they hard-kill dart2js then maybe Dart could turn into a nice language, but dart2js is what keeps Dart from becoming interesting. But since it looks like Dart 2 is going to still support the web via dart2js it doesn't look like Dart's going to get any more compelling.
- dragonwriter 9y ago> Yes but it means that much of Dart was designed around the limitations inherent in JS, which means you get stupid stuff like the int primitive being: "Integer values, which generally should be in the range -2^53 to 2^53" As your own reference notes, Dart ints are defined as arbitrary precision, but dart2js uses js numbers (IEEE 754 doubles), so it's outside the listed range are problematic with code thst might be deployed via dart2js; it has no issues on Dart VM. > Or a completely lack of parallelism Dart’s concurrency model offers shared-nothing parallelism on Dart VM; it doesn't have shared-memory parallelism, which is limiting for some used, but it's not a complete lack of parallelism.