Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"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




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

Search: