Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Dart 1.0: A stable SDK for structured web apps (chromium.org)
50 points by asb on Nov 14, 2013 | hide | past | favorite | 22 comments


As of last week's AngularDart announcement, it sounded like the size of Dart to JS compiled code was still rather large. I'm surprised a 1.0 release has been cut if that is still a problem. I know dart2js can and I'm sure will be improved later, but people are going to make judgements about Dart the language based on its current performance.

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


The problem isn't with compiled size in general, but with code that uses reflection because it's hard to impossible to tell what code is actually executed one the reflective APIs are called. Angular is highly reflective, and we are still working on ways to reduce the size of Angular apps. The Angular team is working on code generators that remove the reflective bits, and the Dart team is working on annotations and other methods to tell the compiler what code is invoked via mirrors. This work will continue post 1.0.


I'd argue that the size of Javascript output is great and it continues to improve: http://work.j832.com/2013/10/dart-to-javascript-output-size-...


Yes, the situation seems much better than I thought. I didn't realise Angular.dart was unrepresentative.


We've been working with the dart2js team to reduce the size and they have been making incremental improvements. AngularDart is smaller this week than last :-)

Both 170KB and 70.5KB are still pretty huge for trivial apps, though.


Great to hear! Looking forward to giving Dart and AngularDart a go.


It's astonishing that the Dart IDE is Eclipse-based - it seemed to me that Google learned its lesson after rewriting Android Studio on IntelliJ Idea, but I've been wrong.


You have to remember that Dart Editor was started before Google moved to IntelliJ for Android (at least publicly). Dart Lang is a relatively small team compared to the people working on the Android dev stuff, so my guess is that it probably was a matter of not dividing resources for an unnecessary transition. In my experience Dart Editor works quite well. Of course that's just anecdotal... Perhaps a Google engineer can shed more light on this matter.


Dart is also supported by other popular editors

IntelliJ and Webstorm http://www.jetbrains.com/webstorm/webhelp/dart-support.html

Netbeans https://blogs.oracle.com/geertjan/entry/dart_and_netbeans_id...

There's also a Sublime text package on github.


I started working with Dart in April 2013 and find it a very promising approach for web development especially as I dislike JavaScript.

I like that Dart offers a feature rich open source IDE just from the beginning, also a lightweight but efficient dependency management, and a lot of other tools and frameworks (Polymer, Angular, ...). The team developing Dart has very competent members and the community is very helpful and growing constantly.

At the beginning I hoped Dart would be more like Go but that would probably be to much difference to the currently widespread approaches to web development.

So I see Dart as a pragmatic approach to enhance web development and IMHO way better than existing technologies and at least a great step in the right direction. Version 1.0 is just the beginning I hope.


I imagine a major reason for the semi-"surprise" announcement is that the team wanted to pre-empt buzz around EMCAScript 6 which contains some features also in Dart. Just a theory... (PS I prefer Dart though.)


I expect ECMAScript 6 to be finalized in 2024.


Apparently you have to "emulate" functions in Dart:

https://www.dartlang.org/articles/emulating-functions/

After reading this I got the impression that Dart is yet another attempt to make the client side web accessible to Java developers who can't be bothered to learn JavaScript.

I think TypeScript is a much better attempt at making JavaScript statically analyzable, because it actually addresses concerns of existing web developers instead of just shoehorning yet another "Java runtime" in the browser.


You don't have to emulate functions in Dart. Dart has first class closures:

adder(x) => (y) => x + y;

You can also make you objects act like functions, i.e. be callable via obj(...). Which is a completely different thing (and you can't do that in JavaScript, only functions are callable).


A profoundly disagree. Javascript is a great language, but that does not mean there is not room to improve. There is a reason tools like CoffeeScript and TypeScript (and even ASM.js) exist: there is a lot of ceremony building large applications with correct, readable Javascript.

The Dart community is full of folks who have written huge amounts of Javascript and consider Dart a welcome advance.

I'm a bit confused how function emulation -- useful, but certainly obscure -- could lead one to simply discard the whole project as tools for lazy Java devs.


> A profoundly disagree. Javascript is a great language, but that does not mean there is not room to improve.

Disagree with what exactly? Where did I say that JavaScript is perfect and can't be improved?

On the contrary I actually said that TypeScript is a good way to improve upon JavaScript, because it actually takes into account real problems that web developers are facing and solves them.

> There is a reason tools like CoffeeScript and TypeScript (and even ASM.js) exist: there is a lot of ceremony building large applications with correct, readable Javascript.

There is a reason why LOLCODE exists too and I highly doubt that ASM.js code is either correct or readable, also I already mentioned TypeScript.

> The Dart community is full of folks who have written huge amounts of Javascript and consider Dart a welcome advance.

And if you look at it the other way around there are probably a lot more developers who have written a lot more JavaScript and dislike Dart. Arguments like these have no value.

> I'm a bit confused how function emulation -- useful, but certainly obscure -- could lead one to simply discard the whole project as tools for lazy Java devs.

Let me elaborate on that a bit: the fact that you have to actually emulate functions means that the language was designed for people who are used to not being able to define functions directly and think everything must be a class: Java developers. This clearly shows that the Dart designers are not even trying to play nice with JavaScript. It may seem far fetched but considering Google's GWT and Closure toolkit, you can clearly see a pattern here.


It's curious that they call it 'SDK' and 'tooltip'. Is it to mask the fact that you have to learn a new very non-mainstream (at the moment) language? It would be more understandable had the Dart VM been marketed as universal.


Learning a new language isn't that hard. Dart is very similar to languages like C# or Java. Dart isn't that groundbreaking different. It's an IMHO new approach to what many think should have been done a long time ago and just a few steps further than already existing technologies. Usually it's much harder to learn how to work with the provided libraries and frameworks. Those who are used to web development can easily reuse most of their knowledge and just add a little bit more each day to benefit from the new opportunities as most are used to anyway.


Exactly - this is not a radical new language. This is a language that in my opinion takes the best of JavaScript and Java, and puts them together. If you're familiar with either, Dart will take you a few hours to get into. Developers, even novices, should not be afraid to give it a spin. It will be VERY familiar.


Next step, a Dart VM for other browsers! Otherwise, it's just another transpiler (aka lipstick on a pig)


May I disagree? The dart2js compiler does everything you'd expect from a compiler, including inlining, removing unused code, reusing constant expressions. There is a reason that the several examples of Javascript from dart2js perform better than the the native Javascript implementation - https://plus.google.com/+KevinMoore314/posts/AZ67yWMgmdq


Until I see enterprise customers doing RFP for Dart, it will be JavaScript for me.




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

Search: