Hacker News new | past | comments | ask | show | jobs | submit login
Angular Announces AngularDart (dartlang.org)
181 points by mushishi on Nov 5, 2013 | hide | past | favorite | 175 comments



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 ultimately will make for a better JavaScript.

Personally, I think there are a lot of people deeply invested in Javascript who fear anything that even remotely, one day in the super future, may threaten their skill set. That's understandable - it's the same way MS developers scoffed at learning Objective-C when the iOS ecosystem blew up and the Windows monopoly didn't matter as much.

Let's inject some reality - Dart is no threat to JavaScript for the foreseeable future. AngularJS is not going anywhere. Dart can't be forced down your throat, because no consumer browser even supports it natively yet. You don't need to use it, you don't even need to think about it. Let the people that like it be.


> Personally, I think there are a lot of people deeply invested in Javascript who fear anything that even remotely, one day in the super future, may threaten their skill set.

Pretty much, I think a large swathe of people who jumped on the Angular JS platform are quite fond of just that -- jumping on the latest technology. They've evangelized for it, knocked on peoples' doors Saturday mornings, wanted to tell them about the great new wonderful framework that will save the world. And now the fear is not that Angular JS will go way. It won't. It will be there sitting on Github accepting pull requests, forks will appear and so on. They fear that there will be something else, newer out there and they will be stuck with 2012 technology. They will be hipsters who are still drinking Pabst Blue Ribbon while all other cooler hipsters are drinking Tecate already.


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


When did Google try to force Dart down your throat? Just because Angular is being ported to Dart? Seriously? Are you saying that Dart developers don't deserve Angular?


Way I see it, no one deserves the misfortune of Angular. ;)


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.


You have a right to be revolted by peoples' revulsion, which you are presently executing quite well.

I don't have a problem with that, I just think you're loudly complaining about how loud everyone is. ;)


Actually you're right, that's exactly what I'm doing. It's like when people are loudly talking in a library and you loudly go "shushhhh!"


...Did it work?

Hint: you're not in a library, you're in a discussion thread.


"Working" in this instance would be convincing others not to complain. I have no way of measuring that outcome. I tried, my effort got some exposure, so perhaps I can h o p e that I convinced at least one person. Clearly, I failed with you though :)


:D


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.


Not a good comparison.

Java and C# are both well designed server side languages. C# has the simple advantage of being younger and learn from Java in the real world.

JavaScript in the real world is not even close to Dart. JavaScript is currently trying to solve problems Java never had to begin with.

In almost every category Dart is technically superior. Shouldn't be a surprise, they took their time and learned from more than a decade of dealing with JavaScript. They are also not done yet, they are planning to inject binary code directly into memory.

Just look at Lars Bak's history, he is the right guy to create the Java/JavaScript successor for the web.


If Google is able to get browsers provide the UX capability same as or even better than Androd/iOS does, things will be different. I'm a layman of web development. But I think this is something worth noticing. The current UX capability in browsers is definitely not a strong point compared with native apps. Google's strategy seems to take territories of internet through browsers. In the mid/long term, making the gap between web app and native app smaller or close to zero in different aspects(such as UX, product development) will probably be one of its high level focuses.


Sigh... I knew this was going to happen. :-/ This is part of Google's strategy to push Dart in the browser. Soon they're going to start developing Angular primarily in Dart, and 'back-porting' features to JavaScript.

Sadly, this is the nature of so-called "Open Source" at Google.


First of all, this was already announced months ago, so it already happened.

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.

Thirdly, Angular is in the process of being broken apart to modular components for 2.0, it also now cross-pollinates with another Google-y called Web Components.

In future, the equivelent of directives (Your own <x-thingy> tags) will be a native web standard, Mozilla is also working on it.

This all amounts to a sort of polyfill to the future and most of the core of Angular will be thrown away if things work out. You won't need it.

These are all good things. I don't understand your need for FUD.


> 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 members of HN does, that we don't need a language to replace javascript. Google is using their weight in the web world to try and get a new/alternative language added.

As long as Dart isn't completely shoved down our throats, I'm willing to give it a try. I think there is enough opposition within Google to make sure that Dart will at least have to live in peaceful co-existence with Javascript.

Google is pretty realistic that it'll be many more years before they can even have a chance of getting other browsers to add the DartVM. Heck, Chrome doesn't have it yet (outside of the Dartium build which has some fun memory leaks).

[0] https://www.youtube.com/watch?v=TlJob8K_OwE&t=17m26s


> 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.


Google can have Dart if Microsoft can have VBScript back.

j/k. I doubt even Microsoft would want to bring that abomination back.

Or would they??


It's not gone. You can still run VBScript in IE10 in lieu of Javascript.


Except Google has its own plateform ( ChromeOS ) that has its own eco system. Native Client doesnt work outside Chrome yet it exists. Google will push Dart VM is Chrome sooner or later.


The article mentions one team who wanted to use it.


You're able to regurgitate bullet points off a slide deck. Good job.

Edit: [source & details redacted]

This 'FUD' comes directly from the Angular core team.


That his points come from a specific source doesn't actually make him incorrect.


You just outed your source.

Edit: still too many details.


Better now? ;-)


Yup. I improved mine as well.


You are able to spread hate and FUD as well. Good job.


I work at Google and on Dart, and I have worked with the Angular team on their Dart port. This is not part of any strategy to push Dart. This port exists because teams at Google want to use both Angular and Dart, and the Angular team decided to make it happen.


> Sigh... I knew this was going to happen. :-/

Yay... I was hoping this would happen :-)

> This is part of Google's strategy to push Dart in the browser.

I know, great, right.

> Sadly, this is the nature of so-called "Open Source" at Google.

I criticize Google often but yeah this is great. Good for Google. It is more than what Oracle or Microsoft or others do.

My opinion is this -- JS is a shitty language. It was a shitty language, no matter how many "good parts" books will be published or how many frameworks one builds on top of it -- it is still an ugly language that makes me want to tear my hair out every time I use it. You love it, great. I hate it. I was hoping from day one someone, some company, would find a good replacement. I can tolerate compiling to it and treating it like assembler. It is even better if it gets bypassed altogether.

There were other posts here about JS's warts, so I am not the only one who welcome any other sane, normal, language to replace it.

Anyway, great work Google, keep releasing new versions of Dart, Dart UI, Dart IDE and so on.


> It is even better if it gets bypassed altogether.

That won't happen. With the amount of JavaScript on the Web, JS is immortal. All you can do is to add another language alongside it.

> There were other posts here about JS's warts, so I am not the only one who welcome any other sane, normal, language to replace it.

But it won't be replaced.


You are right it would run alongside it.

One thing that would help is a couple of killer websites or applications that would do something much better than the rest. If it used Dart and ran on the latest Chrome, that would help its adoption.

It would help Google too because it would increase Chrome install instances running.


> the nature of so-called "Open Source" at Google

I don't understand why did you put "Open Source" in quotes there.

Did Google take Angular of the internet? Did they not put AngularJS out to the world, open sourced? Did they forbid you from forking Angular, working on it, and create a refuge for all "abandoned" developers?


Luckily if someone feels Angular starts to become neglected someone can fork it and actively contribute.

Also, since dart compiles to JS, it could be no back-porting will be necessary.


Well Dart can be compiled to JavaScript. What's not open source about Dart or Angular?


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. That's not a rumor. AngularJS 1.2 is due out soon, and AngularJS 2.0 will be heavily influenced by the work done on AngularDart to modularize and use more web standards. That's also not a rumor.


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


This. Let's pray this doesn't happen.


I imagine they'll give up once they realize all the steam behind AngularJS won't easily transfer over to Dart.


> Sadly, this is the nature of so-called "Open Source" at Google.

What's up with those scare quotes? Angular is open source (MIT), not "open source".


I'm so confused by the comments here. Did I miss a line where they say AngularJS is being discontinued for AngularDart?


It's normal; wait until you see something about Google Reader.


This is the sound of thousands of hipsters realizing they won't be using the latest and greatest toy anymore. There is a shinier newer toy coming around the corner.

That is the only explanation I can come up with. Scouring the comments filled with hate and vitriol I couldn't find much substance as to exactly why the are upset. There is no indication Google is going to sue them for patent infringement for using AngularJS, they are not closing the project. It is open source, if they love and think it is great, they are free to fork it and contribute to it.


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 problems, but overall I think it'll be a better dev experience producing better software.


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


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


Maybe I'm missing something, but yes, I think so. Dart version 0.8.10.3_r29803.

pubspec.yaml:

name: test1 dependencies: browser: any angular: git: https://github.com/angular/angular.dart.git

test1.dart:

import 'package:angular/angular.dart'; main() => ngBootstrap();

dart2js launch => builds test1.dart.js, about 5MB, 142,749 loc.


Yes. You need to add a @MirrorsUsed annotation in your main.dart file. See https://github.com/jbdeboer/angular-dart-js-size/blob/master... for our current best practices.

You should get ~173KB gzipped, minified dart2js output.


Beautiful. Thanks!


So are you using that the full tree shaking algo works with angular now?


There's still a lot of work to be done on code size when using reflection, and teams at Google are definitely interested in incremental updates to cached apps, so that will be worked on too. It's still very early in Dart's lifetime.


I'm really starting to get tired of the cynical and snarky negativity on HN.

Whoever thinks this is part of some grand plan to force Dart down our throats clearly has no clue whatsoever about how Google works.

Standard disclaimer: I'm a Google engineer and these opinions are my own and don't reflect those of my employer.

Google is a really large company with >10,000 engineers. A lot of what we do starts as grassroots efforts. Honestly, getting 10,000 engineers to act in a coordinated fashion is probably like trying to herd 10,000 cats.

AngularJS started as a side project that became Google-sponsored and it grew organically. Being Google-sponsored simply means some team somewhere has dedicated some engineers to working on it. That's it.

Likewise a group of engineers separately started Dart due to dissatisfaction with JavaScript being the lingua franca of the Web. The idea was that Dart can be implemented as a VM within a browser and get faster performance that way. Likewise, it should compile to JavaScript for browsers that don't support Dart in the browser (which is all of them except Chrome). Also, Dart shares a lot of the philosophies of GWT in sharing code between client and server.

Now my personal view is that I honestly don't see the point of Dart. I mean no disrespect to the team or their efforts but I don't agree with the premise or the design philosophy of Dart.

Optional typing seems to me to combine the worst of both worlds. If typing is useful (as the static typers will argue) then be statically typed. If it's not be dynamically typed. Dart's type system is basically just the Closure JsDoc system used by the Closure compiler. That's it. To me, there's no real innovation there.

Dart is really just another Coffeescript and I don't see the point of Coffeescript either.

One of the benefits of development in JavaScript is you can simply refresh your browser and it just works. I'm a huge fan of this fast iteration cycle in development. It's the same reason I'm a fan of Python, Ruby and even PHP.

Additionally, as soon as you add a translation step from something to JavaScript, you introduce potential bugs in that translation (eg I've seen bugs with the Closure compiler incorrectly removed code it thought was dead and that was JS to JS let alone the issues with, say, GWT's Java to JS). Even if there aren't bugs, tracing issues back to the source becomes more difficult.

Rob Pike through Go seems to believe this too (not that I claim to speak for him) because he's repeatedly mentioned that the simple syntax of Go and fast compilation is a deliberate feature, a philosophy I agree with 100%. It's also one reason I detest C++: slow compilation kills productivity (IMHO).

So AngularDart is nothing more than another group of engineers (perhaps there's a crossover with the Dart folks) wants a modern Web framework for client-side Dart so they created one.

The idea that this is part of some grand strategy is quite frankly ludicrous.

Google puts their effort behind a lot of experimental projects. Some work out, many don't. Will Dart succeed? I don't presume to know. But while I don't agree with the premise/philosophy it makes me happy that the company I work for is still prepared to experiment with such efforts and devote resources to them.

If you work at Google you'll often see three teams working on roughly the same thing, typically without knowing about the existence of the others. They may consolidate or compete (if they have incompatible philosophies that the teams feel strongly about) or something in between.

This happens because so many efforts just start out as a single engineer or a small group of engineers just trying something out or they want to solve a problem they see (and in an organization this large it's rare you're the only one who sees a particular problem and wants to do something about it).

So, please, can we discuss this on its merits rather than the new norm of seeing vast conspiracies or simply seeing things as some collusion with the NSA. It's really tiresome.

EDIT: added a paragraph about the issues of bugs and translating something to javaScript.


When dart was released its authors asked for and received, some very specific feedback about syntax which they mentioned they'd be amenable to changing. Nothing has changed.

Much like android dart is controlled by a small group of engineers in Google. Where's the source code to the current HEAD of dart? I'm pretty sure it's not on GitHub. What features are planned for the next release? I'm fairly sure dart-discuss doesn't exist publicly.

Dark doesn't belong to the web developer community. No conspiracy theory needed, dart is built to suit googles purposes, which is fine. The only thing is expecting people to use it and think its a successor to JS, which, for all the flaws of JS, it is not.

Google know what a community developed successor to JS looks like. Optional strong typing in even MS typescript is more popular than dart. Get together with the community or dart will be he next GWT.


Current HEAD of dart: https://code.google.com/p/dart/source/browse/#svn%2Fbranches...

Most of the work is done completely in the open. See some of the language discussion writeups: https://groups.google.com/a/dartlang.org/forum/#!searchin/mi...

We went public two years ago when the language was still in its infancy so that developers could provide their feedback.

Edit: contrary to your claim we did get feedback and acted on it. Some changes were rejected (like putting the types behind the variables), but it's normal that not every request can be accepted.

If you have suggestions on how we can make Dart even more open-source I would be genuinely interested in hearing them.


Thanks for the link. It appears to be a subversion repo. Is that correct?

The most popular feedback from HN https://news.ycombinator.com/item?id=3092558 and Twitter was was less verbose syntax. AFAICT dart remains as chatty as the day it was announced.


The main repository is currently SVN. When Chromium switches over to Git, we will probably follow suit. At some point there was a clone on Github, but I don't know by heart if it still exists.

Syntax is almost like a religion. You can't make everyone happy. So yes: although we changed the syntax in some areas, we kept the C-like syntax.

Fwiw you can't satisfy every feedback. There are always people that want to make Dart look and behave like their favorite language (be it Java, C#, JS, CS, Python or Ruby), then there are others that just want to boycott Dart, and finally there are simply conflicting views.

While we listened to every feedback we got, we found that feedback from people that had actually tried and used Dart to be the most helpful. They weren't always the loudest, but helped to make Dart a better language.


Nobody uses or likes Java for its syntax. They use it for safety. Languages designed since the have gotten progressively terser. That's not preference: that's good engineering: reasonable defaults, avoiding duplicate logic, avoiding surprise, and so forth. Good design is when there's nothing left to take away.

Nobody is asking you to make everyone happy. You could have made (and still have the opportunity to make) dart look like any modern web language - coffeescript, or Python, or ruby, and you'd have both users and a measurable impact on web development.


Have you written or read much Dart?

It's pretty damn concise and a far sight from Java. It's more concise in many cases than JavaScript (and only more verbose around things like type coercion where being explicit is a much safer choice). I admit though, that Dart is more verbose than Perl :)

C-style syntax doesn't have to mean verbose when you have features like short lambdas, optional types, string interpolation, operator overriding, getters and setters, setting instance vars directly from constructor parameters, fewer keywords, mixins, etc. C-style syntax also makes the language pretty much instantly readable, and if you're targeting web developers, being familiar to JavaScript, Java, C#, and ActionScript, is really important.

Honestly, Dart is the most readable language I've used, and that includes many years writing Python.


I wrote up why I think Dart is not the language you think it is here: http://programming.oreilly.com/2013/05/dart-is-not-the-langu...

[disclaimer: I work on the Dart team]


> When dart was released its authors asked for and received, some very specific feedback about syntax which they mentioned they'd be amenable to changing. Nothing has changed.

This is simply not true! I've been following the language for a long time and they have made a lot of changes, they have listened to feedback. Just search 'BREAKING CHANGE' on the mailing lists. During the first year there were tons of changes to the language and libraries. Now they trying to stabilize the APIs


But at the same time they stayed very close to C/C++/Java syntax styles. A lot of people complained about a number of the syntax that the designers didn't want to change.

The designers have also made it very clear that the types next to a variable are basically useless at runtime (unless you turn on strict mode, which kills performance). Types are for tooling only, which seems silly.


Google engineer here too. I completely agree with the fast edit/refresh cycle being a huge plus but that's precisely what Dartium (the build of Chromium that includes the Dart VM and ships with the Dart editor) is for.


Yes, developer workflow is one of the key points I think anyone who has looked at the Dart documentation would get. Or, better yet, even try using the language for five minutes.


"Or, better yet, even try using the language for five minutes."

But this is HN, it is easier to rant about how evil Dart Wader will destroy the beautiful Javascriptalderaan.


As a Dart learner, thank you. Dart IDE is great. It has some rough edges, it is new, but I like that the IDE is developed along the language and the VM. It make a difference.


If the ECMAScript committee would just take typing ideas from TypeScript, stamp ECMAScript 6.1 on it, and approve it as standard, JavaScript could become an amazing language.


Typescript is basicaly EcmaScript4. but Microsoft and Yahoo said NO to it in 2007.

It did not happen BECAUSE of Microsoft (Adobe pushed FOR it, Mozilla got cold feet).


Are you listening Brendan Eich?

Not only that, implement it right away in the JS engines..

Javascript must move faster, because even that people are being forced to like it(because they dont have anywhere to hide); everything has limits.. everybody knows that we cant go on with the javascript the way it is right know and pretends everything its just fine and its all roses and unicorns..

Im trying to create something new here that will need an embedded VM, and deciding between JS, Lua or Dart is just killing me.. if that was an option, and the next javascript was just something like typescript.. this would be a easy decision


The sad thing is, the ES.next committee is more busy with shenanigans like macro meta-programming, which will hurt JavaScript even more, than with fixing the basics and getting this out as soon as possible.


> browsers that don't support Dart in the browser (which is all of them except Chrome)

All but Dartium. Even Chrome doesn't support it natively yet.

> Dart's type system is basically just the Closure JsDoc system used by the Closure compiler.

Yes, it's basically something like that. The difference is that it's terser and far more convenient to use. Since it's baked into the language, it's standardized and properly supported by all tools.

Another difference is that you immediately benefit from putting those annotations at the boundaries. You get the checks and call-tips right off the bat.

> Dart is really just another Coffeescript

No, Dart and TypeScript offer proper tooling. CS doesn't.

Dart also offers much nicer semantics.

> One of the benefits of development in JavaScript is you can simply refresh your browser and it just works.

Same with Dart. You just use Dartium during development.


Thanks to you guys for trying to get rid of the Javascript deadlock/choke hold and get the ball moving. It was about time too.


I think the issue is that conspiracy theories are a natural thing when there has been a significant damage in trust - when Google killed Reader, a much loved product, and other stuff such as closing random accounts with no recourse, they hurt the trust of their developer following. Fool me once, shame on you, fool me twice, etc. The more Google does to act like a cold business as opposed to the nostalgic developer friendly company, they become feared and resented. This is an immeasurably difficult thing to fix.


That's nice that you work somewhere within the vast organization that is Google, but again, this information comes from a source close to the Angular core team about instructions that the core team have received. Unless you're somehow party to this (which you have indicated you're not), I don't see what you can add here.


What exactly are those instructions? You or your friend have a misunderstanding. This dual-implementation will benefit the project as a whole (whether you prefer JS or Dart). That's what this is about, not to make JS a second-class citizen because evil Google wants to shove Dart down your throat.


spankalee responded to you already[1], how much more clear can people be?

[1]: https://news.ycombinator.com/item?id=6678798


"Teams" are made out of people. Managers, engineers. Not all people on the team might have agreed.

To the much more important point, the development of important features stalled for AngularJS as the team was busy working on Dart version. This is the main problem.


> the development of important features stalled for AngularJS as the team was busy working on Dart version.

Not true. Google grew the team. Take a look at the activity on Github. The velocity has been consistently high throughout the development of the Dart fork: https://github.com/angular/angular.js/pulse

If there was some important feature you wanted, you are always able to submit a PR yourself. That's how open source works.


Love GWT, and for the moment, unlike Dart, it uses a language that is viable for both server and client-side code. Until Dart catches up to Java (particularly for the server-side part), I'll be happily using GWT. Dart looks promising, though.


There might not be a formalized 'grand plan,' but Dart doesn't have the open, cheerful intentions of CoffeeScript.

It's being designed as a javascript replacement. Google's overbearing intention is obvious.

You're right: Dart is, functionally, another CoffeeScript, but that's despite Google's plan--ok, 'experiment'--not by design.

>So, please, can we discuss this on its merits

Your criticisms are shared. That's what causes the friction: resentment that a pretty flawed language is being pushed. Dart does take time away from other more worthwhile projects.

None of the cynicism is over wishing that Google would stop experimenting with technology, it's over Google's waste of time.

Edit: Actually, apparently there might be a formalized 'grand plan,' reading nateabele.


What are "open, cheerful intentions"?

Open? Dart has been open-sourced for 2 years now - only having its proof-of-concept done in-house before the announcement.

Cheerful? Not sure how one language that compiles to JS is more "cheerful" than an other, but we're really a cheerful bunch in person. I'm sure you could have a beer with us if you'd like :)

As to the your and the OP's point about Dart being another CoffeeScript, this is really far from reality. CoffeeScript is just syntax changes, and that's not sufficient for fixing JavaScript major problems - which come form its semantics, not it's syntax.

Dart and CoffeeScript are actually quite far apart on the spectrum of compile-to-JS languages: Dart tries to keep a similar syntax and fix the semantics, CoffeeScript tries to keep the semantics and "fix" the syntax (I personally find CoffeeScript very hard to read). Claiming that Dart is another CoffeeScript, to me, shows a real lack of knowledge about one or both of the languages.


I think his point — and I tend to agree with it, accurate or not — was that there is an inherent distrust that comes with a project "sponsored" by a large black box (in this case, Google). Google doesn't exactly have a great track record of supporting things forever, or even keeping their "open source" systems as open as possible[1].

So, people are naturally suspicious. CoffeeScript doesn't have this vibe, to me at least. It's made by a team of people across companies (although I think it is sponsored partially by The New York Times Company?) and there is a lot of community which lives outside a specific company's ecosystem.

That said, it could just be my own personal bias, having used coffee script extensively and not used Dart much at all.

[1] http://arstechnica.com/gadgets/2013/11/google-just-pulled-a-...


There is one major difference between Dart and CoffeeScript: The Angular team didn't have to take a 3 month holiday to make Angular work with CoffeeScript. If Dart was just another compile-to-JS language, then they wouldn't have to bother at all.

Yet, CoffeeScript is not just a different syntax - for one, it changes declarations and scoping rules. That's a pretty big semantic change (comparison operators etc. follow).


Please show me this 3 month break AngularJS took in the Github activity log: https://github.com/angular/angular.js/pulse


They actually rewrote Angular in Dart, they didn't just make it work with Dart.


How much percentage of the dart team/steering committee are Google employees? If that number is higher than, say, 50%, then that is a liability because Google as a company's intentions are unpredictable, because whether the people working on it are good guys or not (and I'm sure you are), there's a common entity that has power over you (your employer) and to some degree your work.


... I was talking ecosystem niche and I think that obvious. Both languages have to compile to javascript to run in the browser, and it's going to stay that way.

You might not be involved enough in the politics of programmer mindshare, but plainly: Dart is attempting a takeover.

Takeovers can be smiles and open source, but they're still takeovers, and this one is doomed to fail.

If you don't see that, you're focused on the work in front of you and (again) not on the politics of technology. Which is fine. I'm sure it would be lovely to have a beer with you, and talk languages and compiler design well into the next day's hangover.

But if you're going to get involved with a conversation on politics, you should think about Google's goals with Dart and whether they're reasonable or beneficial.

General sentiment here? They're neither.


No one is forcing anyone to use Dart, anymore than people are forced to use CoffeeScript, Haxe or pyjamas. Many engineers at Google want a sane alternative to JavaScript, and we think it'll save thousands of hours of developer time, millions of developer dollars, and also _user_ time and money as they benefit from more stable apps with more features. JavaScript is not going anyway. If developers flock to Dart, presumably we've offered something beneficial to them.

I joined the Dart team because I thought is was a worthy and important project that could beneficially impact a very large number of people. I _do_ think about these things, they're quite important to me. The goals of more sane semantics, more optimizable structure, and better toolability and tools are to me, and a lot of other engineers, incredibly reasonable and beneficial. That's actually the entire point of the project is to be more reasonable and beneficial than the alternatives :)

If fact, I think I'll use that as my informal Dart tagline: "Dart, reasonable and beneficial!"

More seriously, Dart is created by people who think that JS is broken and we need an alternative. I hope you're not claiming that that's really an unreasonable opinion, and that the only reasonable point of view is that JavaScript should always be the only language used to develop web applications. I'm sure reasonable people can disagree about the degree of brokenness of JavaScript, and about different solutions to the problems.


I'm aware of JS language angst, yes.

Developers aren't flocking to Dart. Many are resentful of it.

You can ignore the resentment and the reasoning behind it if you want, but that won't make Dart more reasonable or beneficial.


> reasoning behind it

In all of your condescending[1] comments, you have forgotten to actually articulate what your reasoning is. These are as close as you got:

  Dart doesn't have the open, cheerful intentions

  Google's overbearing intention is obvious

  flawed language

  this one is doomed to fail

  forced down our throat
[1] I'll Identify these on request. They're unwarranted, counter-productive and rude.


Oh, why not? I wouldn't mind watching a highlight reel and you seem so gleeful.

---

I think my reasoning throughout this page has been more or less articulated, but I suppose I might try for a compact representation.

What exactly do you think is going to happen with Dart?

Is Google going to add Dart to every Chrome install? Sure, maybe. Will so many developers cry out that Safari and IE will also be forced to implement Dart runtimes?

Is every single browser going to run Dart because Dart will have made such a compelling case that it and it alone is preferable to javascript?

Why not python? Why not C, Java, Scala? We could be running those languages in browsers just as easily as we might run Dart.

Do you think Dart is that amazing? Do you think Dart is just so wonderful that it'll unite the programming world as never before?

No.

Even Google's pet framework is divided and recoiling.

The problem isn't that Dart has to compete with javascript, it's that it has to compete with every other language out there, and it's just not that special. Why Dart? If we're going to be serious about ripping up browsers, why Dart?

Now, I maybe should make it more clear: I don't have any problem with Dart as an experiment, Dart as a transpiled language, or even Angular.dart.

But Google doesn't get to decide the future of the web just because it has a bunch of fancy language designers. Google is trying to shove Dart down our throats, and it's not working, and it's not going to work.

Dart will remain a transpiled-to-js language for a time, and then fall off the radar when it's clear that it doesn't transpile to js very well. The alternative is a fantasy.


You claimed that Dart is a flawed language. Substantiate that claim. Basic stuff here. If you can't, I must assume you're a troll or have no clue yet somehow think you do.

> Do you think Dart is that amazing? Do you think Dart is just so wonderful that it'll unite the programming world as never before?

The world isn't black and white. Dart doesn't have to be perfect to be a viable alternative to JS.

> Even Google's pet framework is divided and recoiling.

No, they both thrive and benefit from the other. It is a feature. The same thing is happening with Polymer.

> Why Dart?

Take a cursory look and you'll find some arguments for Dart but I would think you would have covered this before having such a strong opinion.

> Google is trying to shove Dart down our throats

Said multiple times. Substantiate please.

> fall off the radar when it's clear that it doesn't transpile to js very well. The alternative is a fantasy.

So you know more about dart2js capabilities than the creators of V8 and Dart? This is the condescending and arrogant attitude I spoke of.

https://www.dartlang.org/performance/


>You claimed that Dart is a flawed language.

I was echoing OP (the one who was bemoaning snark and cynicism). Read his paragraphs. Flawed doesn't mean crippled. There are things about Dart I like.

A language can't be perfect.

>No, they both thrive and benefit from the other.

Pay attention to negative feedback. Some substantial portion of AngularJS devs are unhappy.

>Take a cursory look and you'll find some arguments for Dart

I'm not arguing for Dart's existence here, I'm saying Dart has absolutely no chance of securing the browser's runtime over javascript. Why Dart, why not Go?

>So you know more about dart2js capabilities than the creators of V8 and Dart?

https://github.com/jbdeboer/angular-dart-js-size/blob/master...

173KB. This is ridiculous.

Say whatever you want about benchmarks, Angular.dart is either a terrible port (quite possible) or Dart's transpiler isn't on the level of CoffeeScript or TypeScript.

>This is the condescending and arrogant attitude I spoke of.

I'm asserting something grand and sweeping that I think to be true. Get over it or walk away.


> Some substantial portion of AngularJS devs are unhappy.

Define "substantial". I've seen some complaints here that AngularDart has, and will, take away from AngularJS, which, again, is unsubstantiated. It's counter to the evidence and the likelihood that the groups working together will make both better.

> I'm not arguing for Dart's existence here, I'm saying Dart has absolutely no chance of securing the browser's runtime over javascript.

Uh, you've expressed "cynicism [...] over Google's waste of time" and called Dart "pretty flawed", which you haven't substantiated yet. If your were merely expressing skepticism over Dart "securing the browser's runtime over javascript", there wouldn't be a discussion here. Brendan Eich did that for you a long time ago. I'd contend that it doesn't really matter as long as dart2js can fulfill its goals; however, I'd still maintain a wait-and-see attitude about how we'll see DartVM used. There are some very interesting possibilities.

> 173KB. This is ridiculous.

Substance! Thank you. Dart is pre-1.0. It's being worked on. Also, notice at the bottom of that page:

  We want your help, especially if you can make update
  @MirrorsUsed in main.dart to generate a smaller binary.
> Get over it or walk away.

No, I won't. The attitude isn't conducive to civil discourse and not welcome here so I'll continue calling it out where I see it. I'll take the upvotes as confirmation that others agree with me.

You've got your unsubstantiated opinions and will continue making these "sweeping" claims so there's no point in continuing here. It leaves little room for meaningful discussion, unfortunately.


>Dart is pre-1.0. It's being worked on.

Typescript is pre-1.0.

It's telling, to me, that the first argument of mine you take seriously you handwave over by vaguely saying it will get better and it can be fixed.

I'd place a bet that Dart is about as good as it is ever going to be.

>I'll take the upvotes as confirmation that others agree with me.

Sorry to disappoint you, but I've got upvotes, too.

>The attitude isn't conducive to civil discourse and not welcome here so I'll continue calling it out where I see it.

Whatever floats your pompous self-righteous boat.

I may be curt, strident, and critical, but you don't really have high ground when it comes to condescension. You went straight to childish insults. https://news.ycombinator.com/item?id=6679901

When I disagree with someone I don't directly call them stupid or immature. (Well, usually.) I may speak and act as if something I believe strongly is obvious, and I may not mask my disdain for the ideas expressed. There's nothing wrong with being wrong, but I'm not going to hide the fact that I think you're wrong.

You seem to have a problem that someone a) disagrees with you, and b) says so confidently and forcefully. Again, get over it or walk away. If I'm so wrong and so boorish, you are under no contract to continue.

You can't change me and I am not your responsibility.

Fortunately I think you've finally clued in ("so there's no point in continuing here"). I've certainly spent enough time on this. Later.


> Whatever floats your pompous self-righteous boat.

> I may be curt, strident, and critical, but you don't really have high ground when it comes to condescension. You went straight to childish insults. https://news.ycombinator.com/item?id=6679901

Not me. Try again.


Hahaha oh hell, I really fucked that one up. My apologies.

Edit: Mind you, you're still self-righteous and pompous, but you're not hypocritical about it. :P


I am flocking to Dart. Just because there are handful of "developers" yelling and spitting at everyone here doesn't mean others don't like Dart or are not learning it. They just don't yell and spit in everyone's face about so it makes it seems like "OMG nobody uses Dart, please shut it down".

Dart is a great language, I like it. It has consistent typing rules, very fast, has a good IDE. I for one, would like to thank Google for working on it and open sourcing it.


One rdtsc does not make a flock :P

But I don't have any problem with Dart as an experiment in language design. I don't even really have any problem with Angular.dart.

We can always use another language that transpiles down to javascript. People are free to use what they want. (Unfortunately, my understanding is the dart2js process is horrifically inefficient, but that's no skin off my nose.)

I will, however, drive home the point that Dart cannot out-compete CoffeeScript or TypeScript; Dart will not replace javascript and will not be the native language of the web.

There's nothing to distinguish it from any other language, and it has to deal with backlash like this.


IMO Dart is the most productive language for general purpose programming I've ever used, and so do many of the other ~3,300 members of the Dartisans community: https://plus.google.com/u/0/communities/11456694329191923285...

I'm personally happy that there's still hope we have a future option for a re-invented language optimized for web development rather relying on the glacial pace of continually patching JS to make it more maintainable.

It's a small yet powerfully expressive language that's easy to learn, it's very well thought-out and balanced providing greater consistency in both language and library behavior which is a nice contrast to the dump of incompatible JS fx's, it's optional typing adds a lot less friction and is a lot more productive that statically-typed langs, but also provides time-saving compiler feedback alerting errors as you type. It's support for source-maps are best-in-class whilst Dartium provides strong tool-ability and debug support and very fast live-reload cycles. Dart is an awesome option even without considering it's ~10x faster start-up times with Snapshots or its fast run-time performance which sees it can solve the Norvig's top95 Sudoku grids 200x times faster than Ruby: https://github.com/dartist/sudoku_solver#side-by-side-result...

Dart's not perfect and there are some language features I wish it had but over-all I think it's a magnitude better option than vanilla JS. It currently has less momentum than JS, but I hope to see that change as a JS-only future ensures web development will be forever stuck in the middle-ages.


> I will, however, drive home the point that Dart cannot out-compete CoffeeScript or TypeScript;

How are you driving it home besides just repeating it without any other supporting statements? Saying something 3 times doesn't make it truer.

> Dart will not replace javascript and will not be the native language of the web

Still don't get why it wouldn't. What is qualitatively different about DartVM vs v8. It could be 2-3 development cycles away from inclusion should Google decide to do it. What exactly code-wise is preventing that to happen?

> Unfortunately, my understanding is the dart2js process is horrifically inefficient, but that's no skin off my nose.)

Looking at their benchmarks their dart2js is not too far off v8 numbers. Now add types plus a nice IDE and I can see how a larger project might choose instead of JS.


There's a bit of a chicken-egg problem with a project choosing Dart, in that Dart has to already be ubiquitous for it to even be an option.

What is the pathway for Dart adoption? Google puts it in Chrome. Sure. Dart programmers get to deploy to the Chrome browser, so they do some fun side projects and they run on Chrome only. Fine.

Show me how Dart can then move to every browser on every device.

Then show me how whatever hypothetical process you came up with doesn't apply to any other language that currently exists.

If we're going to put a new runtime in the browser, Dart isn't the only option.


> What is the pathway for Dart adoption?

dart2js: https://www.dartlang.org/docs/dart-up-and-running/contents/c...


How is that different from all the other languages out there that transpile to JavaScript?


Dart's one advantage is very fast development cycle if you use Dart VM in Dartium. No js compilation needed. Very well designed user APIs, Excellent modularity (with pub) and good editor support eliminates many opponents.


I have that with many other languages as well.


name one (especially skipping js translation step for development).


JavaScript


It has a VM that has a high chance of being integrated into a major browser.


> It's being designed as a javascript replacement.

Yes, it is. But I'm not sure why you're viewing that as something negative.

It addresses the kind of problems everyone encounters when they try to write bigger applications in JavaScript.

GWT and the Closure Compiler also did this kind of thing. Dart does the same, but in a far more elegant manner. It's terser and the workflow is far more streamlined.

Having proper tooling is really great. Also, thanks to the type annotations you'll need fewer tests, you get better documentation, and it also acts as a safety net for refactoring/maintenance work.

It will enable more people (myself included) to write larger high-quality web applications.


> Google's overbearing intention is obvious.

Please.

> That's what causes the friction: resentment that a pretty flawed language is being pushed.

"flawed language" you mean [] + [] doesn't equal '' ?

Oh look it throws a "TypeError: Object #<JSArray> has no method '$add'", yes please bring more such flawed languages around Google, I love them!


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...


Oh got no please no... I use Angular freakin "JS" extensively.

At some point, I believe I will come to a position not to touch anything that has even a remote connection to Google. Just a couple of years ago I worshipped Google, now I feel they are always taking my toys away.


For those of us who don't have the benefit of your experience, could you explain why you think Google is doing something wrong here?


Good for Dart users. And competition is healthy.

Javascript needs some challenge, just like Flash forced HTML to evolve.

So this is a good thing. Congratulations. And devs should know this, nothing is set in stone on the web.


As if the javascript version was so good that it doesn't require anymore work.


False dichotomy. Work on the the JavaScript version has actually increased. Google grew the team, not split it. https://github.com/angular/angular.js/pulse


How is this anything but a good thing for AngularJS?


Don't know much about Dart. Is there a way for Dart code to call/use Javascript libraries? Like could I use D3 in Dart?


Yep, we use d3.js on Dart projects internally.

Check out the dart:js library, which is pretty new, and the article that _ak linked (which needs some updating).

http://api.dartlang.org/docs/releases/latest/dart_js.html


There's a library to call JavaScript code from Dart, both in the VM and when the Dart code is compiled to JS: https://www.dartlang.org/articles/js-dart-interop/


When is AngularJs 1.2 stable release coming out anyway?


If someone creates egghead.io for Dart, I will pay for it.


I'm using AngularJS. But this Dart news is a dark cloud. I will never use Dart, or anything that locks me into Google's walled garden. I view Dart as a major negative.

Hello Ember.


What walled garden, could you elaborate?

Dart is an open-source project and compiles to JS. Not unlike CoffeeScript or TypeScript. The cool thing that makes me excited about dart2js is that Dart is a much better language than JS itself (not a high bar, but still) and that dart2js as of late is producing more efficient code than hand-coded JS because they leverage Dart's more ubiquitous typing as well as other tricks.


Hello overreaction.


Seriously, if you like and use AngularJS and based on something tangential like this Dart announcement, you decide to switch to Ember, which honestly is not that similar.

Like someone said, you/we can always decide to fork project, but again... let people who care about Dart try to do it, I think this is legitimate prof of concept. I don't think it will catch up, if there is genuine work outside Google on Angular.

I am grateful for good work done on Angular project and look forward for new features. I will not use Dart that is for sure.


Ember is a "no" for me beacuse of explicit getters and setters.

Angular's Object.observe like digest mechanism is superior.


observe is so slow however, not matter which way you do it.


"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?


BrendenEich said this of Dart, 2 years ago on HN, and might help explain OP's sentiment:

For the record, I'm not worried about JS being replaced by a better language. I am working to do that within Ecma TC39, by evolving JS aggressively.

The leaked Google doc's assertion that this is impossible and that a "clean break" is required to make significant improvements is nonsense, a thin rationale for going it alone rather than cooperating fully.

The big issue I have with Dart, which you seem to consider inconsequential, is whether Google forks the web developer community, not just its own paid developers, with Dart, and thereby fragments web content.

A Dart to JS compiler will never be "decent" compared to having the Dart VM in the browser. Yet I guarantee you that Apple and Microsoft (and Opera and Mozilla, but the first two are enough) will never embed the Dart VM.

So "Works best in Chrome" and even "Works only in Chrome" are new norms promulgated intentionally by Google. We see more of this fragmentation every day. As a user of Chrome and Firefox (and Safari), I find it painful to experience, never mind the political bad taste.

Ok, counter-arguments. What's wrong with playing hardball to advance the web, you say? As my blog tries to explain, the standards process requires good social relations and philosophical balance among the participating competitors.

Google's approach with Dart is thus pretty much all wrong and doomed to leave Dart in excellent yet non-standardized and non-interoperable implementation status. Dart is GBScript to NaCl/Pepper's ActiveG.

Could Google, unlike Microsoft ten or so years ago, prevail? Only by becoming the new monopoly power on the web. We know how that story ends.

https://news.ycombinator.com/item?id=2982949

EDIT: updated to the long form quote, for additional context.


And here we are 2 years later, TC39 is still nowhere in sight, Javascript is still, in the eyes of anyone with an ounce of taste, a terrible language for large scale development and Dart continues to iterate while offering all of it's advancements as it compiles to JS.

I honestly don't even care if Dart doesn't take off, maybe clojurescript or something similar will instead. But my god something needs to happen in this space because the JS standards body has spent almost 2 decades aggresively doing nothing about the many gaping, egregious flaws in Javascript. Its 2013 and we don't have lexical scoping as standard, but hey let's dick around in committee for another year packing in generators, etc, etc, etc.

I would honestly put a lot more weight in Brenden Eich's words if the state of Javascript and web dev wasn't so absolutely dismal and if he wasn't trying to crap on a project actually working to do something about it.


> TC39 is nowhere in sight

Uhhhh TC39 meets bi-monthly. If you meant ECMASCRIPT 6, it's targeting finalization next month. Furthermore, future releases are set to be much, much faster than previous ones.


Yes I meant the standard produced by TC39, of which Ecmascript 6 is the new version. My apologies for loose use of terminology.

I would be somewhat happy if ES6 was finalized next month, but if it slipped (again) I would not be surprised. You'll also have to forgive me if I am skeptical of claims about the increased speed of future standards. The burden is on TC39 to prove this to me and I reserve the right be skeptical based on prior evidence until I see otherwise.


ES6 features are already shipping in many browsers. http://kangax.github.io/es5-compat-table/es6/


I am kind of in this camp as well. I understand there is nothing much now to replace js on the client (kind of like js as an assembler language so stuff compiled to it), but I am ready for something better. But also, it is 2013, []+[] should stop being equal to ''.

Also think if anything or anyone is going to make a change it would have to be Google. Can't image a small company out there coming up with a new browser with a new language. It would have to come in Firefox or Chrome. So I am excited for Dart.


> A Dart to JS compiler will never be "decent" compared to having the Dart VM in the browser.

I'm new to javascript & dart, so honest question here: why?


Because it is a Google project, and other browser vendors (those mentioned in Eich's next sentence) don't want to include something from a competitor into their own browser. It'd be about like Ford proposing that GM and Dodge install Ford's GPS unit (hopefully you can relate to major US automakers).

He might have spoken too soon though (or I missed the point), as there are projects out now that I think could very well make a decent runtime for Dart. Using tech such as asm.js[1] -- which Firefox now includes natively (drawing a parallel to Google's Dart) -- along with new versions of JS, and modern JS browser optimizations....it can make for a very efficient script.

As efficient as Dart with the VM? Probably not, but I'm not sure just how much of the market you're going to corner by such an advantage. Any JS outside of a browser will undoubtedly run on NodeJS, which is going to be more efficient than Dart for most (if not all) tasks, and so it just comes to down to in-browser usage. For 99.99% of current web apps, I don't think you'd never notice a difference.

1. http://en.wikipedia.org/wiki/Asm.js


Don't listen to the hate and vitriol.

Dart has a nice IDE, good clean types and language design. People are upset because they jumped on the wrong band-wagon and now something shiner and newer came around so they are not the cool hipsters anymore. Kind of like in the kindergarten the kid with the shiny new bike is boasting then some other kid gets the later, better, shinier model, the first gets upset and throws a tantrum.

Look at Dart's performance benchmarks. Its DartVM is about 2x as fast as v8 (JS) and its compiled to JS version is on par with v8.

https://www.dartlang.org/performance/


> Dart has a nice IDE, good clean types and language design.

I have a serious problem with Dart's design: the type system is deliberately unsound around generics because the designers apparently think that supporting variance (which is not that difficult!) is worse than having types tell the truth. I would much rather there be no type system at all than there to be an unsound one, as I don't think compilers and IDE's should lie to you.

I think that's a mistake that the new language of the Web should not make, but Google seems unwilling to change it. Unlike JavaScript's warts, which be worked around for the most part, I don't see any way to fix a flaw that serious in the type system once Dart is stable.


I don't understand this. Dart is a dynamic language that gives you the option of adding types that help with tooling, documentation and some type checking at design time. At run time you can run it in checked mode and it will always tell the truth. This means that if you cover your code at all, manually or automatically then it will inform you of type errors. If you don't cover your code before releasing it then you probably are not writing anything very serious anyway. How is this worse than a dynamic language that offers you no optional typing with full checking at runtime?


> Dart is a dynamic language that gives you the option of adding types that help with tooling, documentation and some type checking at design time.

But the tooling and documentation aren't telling you what will happen at runtime.

> At run time you can run it in checked mode and it will always tell the truth.

It doesn't tell you the truth. A static type system is designed to rule out errors are compile time. That's what makes a static type system different from type assertions or guards.

Besides, I don't really know what "telling you the truth" means if, for example, function arguments unify under covariance instead of contravariance like they should. Whether that happens at runtime or at compile time makes no difference—it's equally wrong either way.

> This means that if you cover your code at all, manually or automatically then it will inform you of type errors.

This is always true in any dynamic language.

> How is this worse than a dynamic language that offers you no optional typing with full checking at runtime?

In JS's case we can still add a static type system that's actually sound, whereas Dart has already crossed the bridge into unsoundness.


>That's what makes a static type system different from type assertions or guards. This system is different from type assertions or guards in that you do not have to write any assertions but will still be informed of most type errors at compile time and virtually all type errors at runtime (Its been a while since I have written some Dart so I'm not 100% sure and don't have time to check if its exactly 100% of scenarios)

> This means that if you cover your code at all, manually or automatically then it will inform you of type errors. >> This is always true in any dynamic language.

No, there's a difference. I will get the error in dart as soon as I try to use the object in any way. In a dynamic language I could call a few methods on it before calling a method it does not support. i.e. it behaves like a compiler would except at run-time. This makes a big difference in how quickly you can debug it and again this is only for the minority of scenarios that are not covered at compile time.


"forks the web developer community, not just its own paid developers"

Brendan Eich does not have a right to anybody else's effort. It is totally unreasonable to use artificial means to trap people on languages they have problems with, just because you want control of more of the programming world for yourself.


A developer who is seeing "dark clouds" and other doomsday scenarios at release of a nice open sourced package not using or participating in a community is an asset to that community.


What do the other browser vendors gain by supporting Dart?


It doesn't matter - Dart can compile to JavaScript.

When it might matter is if there are apps (like games) that run faster in a Dart VM than in javascript. Anyway though, even Chrome doesn't include a Dart VM yet by default, so no big deal yet.


To piles of JavaScript, you mean.

As well as, forcing developers to infer the way Dart compiler generates JavaScript code, in the absence of source maps.

I rather use JavaScript, thank you.


dart2js generates source maps


You need browser support for them.


Use chrome when debugging


How to debug browser specific behaviors?


I believe others (at least Firefox) will add eventually. https://wiki.mozilla.org/DevTools/Features/SourceMap


Futurology.


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 language on it.


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.


In what way is Dart "so far behind" CoffeeScript?


developer mindshare.

Check tag count for questions on SO; 4500 for CoffeeScript, 1500 for Dart.

Not to mention the violent revulsion many people (myself included) are expressing in this topic.


By that metric, GWT blows away CoffeeScript with ~15,000 questions on SO. Are you sure you want to use that metric?


Point was to compare compile-to-javascript languages.


Uh, GWT is a Java-to-JS compiler.

On that note, Java has 508,338 questions on StackOverflow, which crushes CoffeeScript, /especially/ with those 15,000 GWT questions ;)


Oh, interesting. Is it really a standalone transpiler or is it a set of tools?

As someone else pointed out, SO isn't a great metric, but finding github activity by language seemed to take more time than I was willing to invest.


No metric will be great right now because Dart is so new compared to CoffeeScript. CoffeeScript 1.0 was released 3 years ago. Give us a chance to get 1.0 out the door :)


That's not a very good metric. CoffeeScript is twice the age of Dart.


Fair point; I was trying to get github numbers and got sidetracked.


> Not to mention the violent revulsion many people (myself included) are expressing in this topic.

Immaturity seems like a good explanation of that effect


Not your best work.


I just let Occam do the dirty work for me sometimes.


Oh don't be so simple.

:P


This is the nature of using any third party software or API. If you're not going to write it yourself, then you have to be willing to play by someone else's rules. Words I learned to live by years ago.

Coincidentally, this is how I feel about AngularJS. By using it, you're developing apps the way Google wants you (or it's own developers) to. It could be good, it could be bad. it depends on the app, but you still have to do it their way.

You don't want to be locked into Google's walled garden, but, by using Angular, you're already inside...


You do realize who made/maintains Angular right?


"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction." ~ Albert Einstein




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: