Hacker News new | past | comments | ask | show | jobs | submit login
Dart 1.9 (dartlang.org)
133 points by tosh on Mar 26, 2015 | hide | past | web | favorite | 55 comments

This is imho the most exciting release since 1.0 :)

In a nutshell:

    * async/await
    * generators
    * enums
    * Dart Analysis Server (accessible through IntelliJ/WebStorm & Sublime)
    * New RegEx engine, 150x speed up in Dart VM
    * …

Unfortunately yesterday's announcement about stopping development of Chrome Dart VM has put a dampener on things for me. I'm not particularly interested when there are other projects like TypeScript which also transpile to Javascript.

It's also making me question the long-term viability of Golang, given Google's history of shutting down projects abruptly.

Are any important teams inside Google using Golang for heavy-lifting? At least Dart talked about the Google Ads team using Dart. One of the goals behing Golang was go have C++ programmers move to the language, but instead it's Python and Ruby programmers picking it up. So if C++ Googlers aren't using the language, it might imply that no critical systems are being built with Golang.

Also look at the resources that were initially put behind Dart. Meanwhile look at Golang, after all these years there is no official IDE. You would think that if Google were serious about Golang they would have put more resources into developing the ecosystem. It seems like Google want to have their celebrity employee, Rob Pike, in order to attract worker bees to apply for the grunt work at Google. Much like yesterday's post about Bjarne Strostroup working at Morgan Stanley.

Long term viability of Go? Go has tons of activity (Kubernetes, Docker, ...), millions of lines at Google[0] and many conferences, Dart is just now getting its first conference later this year.

You should be questioning the long term viability of Dart, not Go.

[0]: https://groups.google.com/forum/#!msg/golang-codereviews/DrG...

What am I looking for in that link? I may be mistaken but doesn't google3 refer to third party libraries, and not code written internally for Google? All I want to know is if a major team at Google is using Golang for any critical services.

I don't care for conferences, but I do care about tools. Google put resources into developing a full IDE for Dart, yet nothing for Go...

>I may be mistaken but doesn't google3 refer to third party libraries, and not code written internally for Google?

No, google3 is the top-level directory for all of Google's source code.

They're using it:


Also, does Go really need a full IDE? I'm pretty happy using Sublime Text. Perhaps the JavaScript types are just more demanding about their IDEs?

I've seen Brad talk about this. It's the same example that has been trotted out over the years. Not that impressed. If some of the Gmail or Adwords system has been ported or re-written to Go that would be impressive.

An IDE is important for many developers. Go would certainly benefit from being able to develop and debug in one place and have all the project management stuff handled. Why rely on a third party like Sublime Text? Visual Studio, Xcode (warts and all) and IntelliJ are good IDEs that boost productivity. The question is why hasn't resources been made available by Goodle, whether money or personnel, to do something here? Maybe work with IntelliJ to create a Go version of their IDE like they have for other languages and DART?

Looking at your other comments I think you're just too demanding. I'm not going to chase around the internet to convince you otherwise. I'm comfortable with the level of support and that's good enough for me (and many others). Same goes for Dart. If you can't be convinced otherwise then just use Java.

The Go team seem to have focused on command line tools for now. This include tools for refactoring Go code. Of course it would be easier to start with Go if there were an IDE with refactoring and syntax check built-in but there are at least some tools created by the team and the Go users. I assume the tools will improve and that there might be support in other editors or IDEs if the usage of Go increases.

I also wish that Google or the IDE creators would build some of these tools but I don't see it as absolutely essential.

LiteIDE is a complete Go IDE. But I agree Google should invest in a proper Go IDE.

I used the emacs/vim tools on win64 but since I am not a vim/emacs specialist I failed. In any case Komodo Edit and Atom have golang support.

Lite IDE rocks but keep an eye on the others too.

As for IntelliJ, there is a plugin for Go (https://github.com/go-lang-plugin-org/go-lang-idea-plugin), it's in active development and pre-release builds are published regularly. Any feedback and contributions are welcome.

I think the market fills the void if there's demand. No one worked with JetBrains to create RubyMine; they saw the need.

(edit: the company is JetBrains, not IntelliJ)

There is a feature request open to add Go support to IntelliJ. Go vote for it.

Does Google Cloud Platform/Kubernetes count as a major team/critical service?


YouTube Vitess provides servers and tools which facilitate scaling of MySQL databases for large scale web services. https://github.com/youtube/vitess

That, and a layer for Google Downloads, was the only real examples, and we've been given them 3+ years ago.

Not much since then, except some small stuff (a Google doodle made in Go, etc) and some mentions of teams using it.

The details of the code is confidential, but there are more than a million lines of go code.

I'll take your word for it but it would be nice to have some of the other Google engineering teams singing the praises of Go, writing blog posts, etc.

    > yesterday's announcement about stopping development of
    > Chrome Dart VM has put a dampener on things for me.
I had the opposite reaction; non-reliance on Chrome incorporating a VM means it might actually have long-term legs.

All is pretty fine with Golang, especially inside Google. Tweet to illustrate: https://twitter.com/rob_pike/status/575853496592826369

And I think all will be fine with Dart too. Today's release is very interesting for server-side development. In both cases, on the server and on the client side, people will use Dart when they prefer Dart to JS. And difference not only in syntax or amount of sugar, but in "how the whole system works" (don't know how to say it). And when you know that most profitable web project in human history is committed to Dart, then you can be sure, Dart is here to stay :)

That tweet has no information - why is it of any significance?

Maybe because Rob Pike (one of Go authors) works at Google and many Google developers often write how they glad to write things in Go for Google needs. Next step is up to you - use search engines to get more information :)

Last what I remember: https://blog.twitter.com/2015/handling-five-billion-sessions... (not Google, Twitter, but still big company).

Are they really committed to it though? The same way they were committed to Google Code? Google Glass? Google Video? Google Reader? Google+? All Google projects that they were "committed" to at one time. Now dead or basically abandoned.

Those are (closed-source) products though - Go and Dart are languages, and both are open source to boot - so if Google drops support, the open source community - and definitely the larger users that depend on it - can take over without a hitch.

Google Code is being dropped because nobody uses it anymore. Google Glass is on hold because nobody wants to use it and it's not ready yet. Google Video was dropped because they bought Youtube after realising they couldn't compete with them. Google Reader... I don't know, that was a bad decision on their part. Google+ was their biggest failure to date, I think, not because of a lack of effort on their part but because it never got the traction they wanted it to get.

Same as Google Wave really - too early, or nobody needed it, or something like that. At least they open sourced that project.

I think most if not all of the core team for Go are employed by Google, so if Google dropped Go it would have a huge impact. The community could pick it up but let's be honest, without the original backing by Google, the language would never have gained traction and would be just one of many interesting languages.

   All those projects it dropped were consumer facing. These are programing languages being used inside google to increase productivity making a comparison between the two is a straw mans argument.

I'm also a stronger believer in TypeScript not because it's necessarily "better" than Dart, whatever that would mean, but because it was designed from a much MUCH more pragmatic perspective with TypeScript being a mere superset of Javascript.

So while both transpile to Javascript and that's great when it comes to cross-browser reach, a large Dart codebase makes me nervous since there's a high barrier of both entry and exit if Google would abandon the project, which they have shown themselves to be good at doing, especially with little to no forewarning. TypeScript's approach just feels more sensible to me.

I like the vision set by Dart -- a complete toolkit in language as well as API for the modern web, client as well as server -- and while TypeScript may not share it, it does share the vision of greatly simplifying large scale web application development. Further, I think it even surpasses Dart on that front for above reasons and general workflow and migration reasons which cannot be underestimated in particular for a new language.

Dart comes with an Eclipse IDE. Cross-platform by default. even Haxe needs Flashdevelop which is Windows only.

Dart is better for cross-platform development.

> Unfortunately yesterday's announcement about stopping development of Chrome Dart VM has put a dampener on things for me. I'm not particularly interested when there are other projects like TypeScript which also transpile to Javascript.

Why is that an important difference? The advantages of Dart over TypeScript are that it has better semantics that result in more readable/maintainable code, not that it does or doesn't run in a different VM.

> One of the goals behing Golang was go have C++ programmers move to the language

where did you hear that ? C++ programmers didn't move to D why the hell would they want to move to Go , a garbage collected language ?

Rob Pike, one of the creators of Go, said so:

> Although we expected C++ programmers to see Go as an alternative, instead most Go programmers come from languages like Python and Ruby. Very few come from C++.[1]

I thought this was obvious, considering their initial approach to promote Go: "Go is a systems language". But now they abandoned the phrasing.

[1] http://commandcenter.blogspot.com/2012/06/less-is-exponentia...

Ok, well they were wrong. How can something be a "system language" when it's garbage collected ? and if people learned anything from D you don't say "X is a replacement from C++" or your language will get bad rap.

By "system", I don't think they meant "kernel". I think they meant "non-user-facing program". Think server/batch programs, which are way too often programmed in C/C++ although they don't need to.

Isn't it just called Go?

Try searching for "Go" on some search engines ... therefore tag your posts/questions/tweets with "GoLang" to make it easier to find 8-)

dartlang.org has two articles on async/await support by Gilad Bracha. The Stream and generator support is particularly awesome.



This is the biggest release since 1.0. Async/await and generators are a welcome addition. Shareable server sockets and better isolates are also nice to have.

Enums are currently rather disappointing though. They went with the simplest possible implementation... minus 1. You can't assign integers. Which is a problem because you can do that everywhere else. Naturally, there are many protocols and formats which use ints to represent specific enum values.

I hope they'll fix this in the future.

Speaking of the future, there are a bunch of other interesting things on the horizon such as null-aware operators, non-nullable types, and union types.

The upcoming "Fletch" runtime for iOS and similar restrictive environments is also very exciting. It might turn Dart into the perfect language for video game scripting. It's small, fast, and it supports atomic program changes via a wire protocol.

Anybody knows if async/await is supported by dart2js yet? https://www.dartlang.org/tools/dart2js/ says that it's not, but I'm not sure if that page was updated or not.

Yes. Dart2js in v1.9 supports async/await.

Thank you for clarifying! Since you work on Dart, could you please update the dart2js page as well?

Will do.

I used to play with the Dart language - really nice having a client and server project in one code base and in one language.

BTW, it seems odd that Dart is not supported server side on AppEngine. Sandboxing problem? You need to use a compute engine.

You can use it on App Engine Managed VMs:


App Engine decided to go that route to add new languages, rather than sandbox each language individually like with Python and Java (The Go backend was created by the Go team before Managed VMs).

I've never used Dart before, but since this is the exact pattern that C# follows I may have to five it a whirl in the future. I'd love to see more languages adopt this pattern.

There are a few differences. Here's a fairly theoretical article about the details:


Skip down to: "While async functions may remind us of the async/await feature in C#, note that there are differences."

The first author is Erik Meijer who worked on C# (among other things) at Microsoft.

This is a really excellent article. Thanks!

As someone who gave a tech talk on Dart and how awesome it is, I wish I could back it as a tool of choice for web projects.

However, I even abandoned PHP for its fractured community in the past couple months. I don't see how I can back Dart when its creator is so publicly disinterested.

I apologize if that seems harsh, but it's just how I feel.

How is he publicly disinterested? Link?

As someone interested in DART for web projects, I wish I could try it out. But it's tied to the Chrome ecosystem (it installs a local copy) and Chrome is not one of our corporate standards.

I don't understand this complaint. Dart is not tied to Chrome at all. The local copy of Chromium is just an optional development tool included with the SDK download. You don't have to use it.

You can use Dart with any modern browser. Use it with IE if that's your standard.

It may be a circular dependency problem, but when I start DART I get an error from my local workstation nanny that Chrome startup is blocked and then DART exits. So if there's a way to set DART to another tool than Chrome I can't seem to get there.

I haven't tried it with DART 1.9 so maybe that problem is no longer there.

Who's publicly disinterested?

Sorry, I should have been clearer: Dart's patron, rather than its creator. Google.

Applications are open for YC Winter 2020

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