Live data from Hacker News

Angular Announces AngularDart

news.dartlang.org

41–50 of 177 posts

Re: Angular Announces AngularDart

#41
post #11

Earlier quoted context omitted.

"I will never use Dart" That's quite a sure statement. Why don't you think Dart will ever be natively adopted by Firefox at some point in the future?

Because that's a pretty laughable idea. There's no reason for browsers to choose Dart over CoffeeScript or TypeScript, and Dart is so far behind CoffeeScript it's not even funny. Google wants to do it, sure, but that doesn't mean they'll succeed, even if they try something as stubborn as running Dart alongside Javascript in Chrome. There simply isn't a path to ubiquity for Dart, and if there were it's not the only la…

You have it backwards. There's no reason for browsers to choose CoffeeScript or TypeScript because they do not change the semantics of JavaScript which make it hard to optimize for. There really isn't anything for a browser to adopt with one of those languages, other than a small translation to JS.

Dart is fundamentally different in that it was designed for speed (as well as toolability and readability) and by directly supporting Dart a VM can make many more optimizations than a JS VM can. The Dart VM is already 1.5-2x faster than JS in some cases, while being _much_ younger.

Re: Angular Announces AngularDart

#42

If you don't like Dart, don't use it. Nobody is taking away your AngularJS. Google has a right to promote whatever language it thinks will give it a competitive advantage. You have a right to be revolted by it. However, the hyperbole surrounding anything that even remotely, several years down the line, may threaten the monopoly of JavaScript on the client side web is ridiculous. Language competition is good - it ulti…

Just because it can't be forced down our throat doesn't mean it's not uncomfortable that Google's trying.

Re: Angular Announces AngularDart

#43
post #31

Earlier quoted context omitted.

It may be open source, but it makes it more difficult to work with existing js libraries, and shoehorns you into a particular environment that is not standard frontend (html, css, js). Sure, Dart may compile down to js, but that adds another layer to a build process, and increases complexity unnecessarily. As a fairly knowledgeable user of Angular & sometime contributor, this is a disturbing rumor.

The dart:js library makes it quite easy to work with existing JS libraries. Most of the teams using Dart at Google are also using some Js in their apps. Dart encourages a very standard frontend: HTML, CSS and JavaScript, so I don't get that point. Dart compiles to JS like Haxe, TypeScript, ClojureScript, CoffeeScript, etc. I'm not sure what "rumor" you're referring to. AngularDart is a thing and it reached beta today…

Read the first comment in this whole chain that you've replied to. That is the rumor that is the subject to much scrutiny.

Re: Angular Announces AngularDart

#44

If you don't like Dart, don't use it. Nobody is taking away your AngularJS. Google has a right to promote whatever language it thinks will give it a competitive advantage. You have a right to be revolted by it. However, the hyperbole surrounding anything that even remotely, several years down the line, may threaten the monopoly of JavaScript on the client side web is ridiculous. Language competition is good - it ulti…

Just because it can't be forced down our throat doesn't mean it's not uncomfortable that Google's trying.

Like I said, "You have a right to be revolted by it." But, I think it would probably be a better use of your time to be uncomfortable over things like hunger and disease than a company trying to promote a new programming language to further its self interest - that's what companies do.

Re: Angular Announces AngularDart

#45
When I look at Dart vs JS (JavaScript), I see a lot of parallels to Java/C#. The Java language stagnated for a long time under Sun. The language was usable only through the heroic efforts of tool vendors (Eclipse, IntelliJ, etc.) Even with these tools, Java is just barely good enough.

C# is technically a superior language to Java. Combined with an excellent IDE (VS), the .NET platform is probably technically superior to the Java platform. However, .NET did not destroy Java. And it's because Java is superior to .NET in many non-technical areas (such as a better open source community). And other solutions appeared to help the Java platform with the language stagnation issue (Scala, Clojure, Groovy, etc.). Now Java itself is somewhat catching up (Java 8) and the JVM platform remains a powerful and thriving community.

The situation with Dart and JS seems to be similar. The JS language has stagnated for a long time. Google is trying to be like MS with C# and created Dart to fully replace JS. And Dart is probably technically superior to JS. But just like Java vs C#, I don't think technical superiority will be enough.

The JS platform is addressing the language issue with CoffeeScript, TypeScript, and others, just like Scala and Clojure appeared for the JVM. And JS itself is improving slowly (ECMAScript 6) just like Java 8. And the JS open source community is very very strong (all the web related libraries and frameworks and now additional strength from Node.JS) and it's unlikely Dart will have a comparable community. I think that Dart may achieve some success like .NET/C# did. However, I don't think it will destroy JS like Google hopes it will. The JS platform is just like the JVM platform. Has so many flaws, but is good enough.

Re: Angular Announces AngularDart

#46

I like both Angular and Dart, so that's good news. One thing I noticed though: transpiling a .dart file with just the import statement for AngularDart (import 'package:angular/angular.dart') generates a non-minified 5MB .js file with almost 150 kloc. Every code change will create a new version of it, invalidating previously cached versions. :/

Are you sure you are using the latest version? Angular was an early user of mirrors (reflection) which (more or less) disabled the tree-shaking of dart2js. This was recently improved.

Tracking the size of AngularDart: https://github.com/jbdeboer/angular-dart-js-size

Re: Angular Announces AngularDart

#48
post #29
post #22

Earlier quoted context omitted.

> Secondly, Google is a big company and some teams within it wanted to use Dart, whereas otheres want to use vanila javascript and Angular, so now you have both. Specifically who?

A number of the members of the Chrome team. If you watch the announcement from when Blink hit, they did some developer talks. When asked about the integration of Dart into Chrome, it was fairly obvious that some of the guys didn't want Dart in there [0]. But at the same time, a high-level direction is being set to try and get Dart added. Google employs a LOT of developers. A lot of those developers feel the same way…

> it was fairly obvious that some of the guys didn't want Dart in there

I don't think it was obvious. It may be true but they were uncontroversial comments on a controversial topic. The language and DartVM aren't ready for Chrome, right now. You'd hear the same from the Dart team.

> we don't need a language to replace javascript

Absolutely... in the same way we didn't need Python, Ruby, C++, Java, Clojure, Haskell, etc. In fact, I'd say we needed those less considering the enormous choice on non-web platforms.

Re: Angular Announces AngularDart

#49
post #36

I'm excited for this. I have a fair sized angularjs app that is getting unwieldy, and having a compiler that yells at me about type problems sounds great. Even if dart doesn't get supported by non-Chrome browsers, I think it could still provide lots of value to developers: it has the same useful type checking as typescript, with some other needed features. It is possible that the transpilation to JS will cause proble…

Yeah I started making a chrome app for my own use and it's starting to get to a point where if I don't work on it for a while, I spend a bit too much time making sure I'm not creating bugs interacting with old code

Also, Chrome apps seem to be a great use for this even if no other browsers embed a dart VM (if it gets to that). I'm just not seeing why this is so bad

Re: Angular Announces AngularDart

#50

I like Dart. It's fun to write. I don't understand all the vitriol directed towards it.

I don't either, although while I think dart is an improvement over javascript, it also is basically just like java. I'd prefer a runtime that multiple languages could easily compile to, but until then there are several languages that can compile to javascript, treating it like a runtime (including dart itself): https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
Post reply on HN