
Dart 1.0 Is Out - rdtsc
http://news.dartlang.org/2013/11/dart-10-stable-sdk-for-structured-web.html
======
amix
This is really awesome! Congrats to the team!

We have a ton of JavaScript/CoffeeScript code and I really wish we could use
something like Dart. JavaScript is great for smaller projects, but once you
get a ton of code it really becomes a unmanageable mess.

I think tho' it would be amazing if Dart could run on the server side as well.
This way you could just have one language on both the client and the server.

~~~
camus2
If you are looking for a structured language (for front end dev), Typescript
is a better alternative imho. Javascript devs can still read it and it's
compatible with any JS library out there.

Dart not so much since the semantics are different.You can still interact with
JS libs but it's not as straight foward as TS.

I tested a number of options (GWT,Haxe,CS,Dart,Opal,Jsx,...),while i'm not a
Microsoft fan(by a long shot),Typescript is the solution that allows the best
integration with legacy code and pure JS libraries,while making easy to port
old java/C#/as3 code to JS.

~~~
TazeTSchnitzel
I agree with this very much. Dart is a new language; JS is an existing
language, improved.

Dart actually has horrible semantics in places. Only if x === true will if(x)
run.

~~~
dasmoth
That's very different from Javascript (and from the untyped-language
mainstream) but is it really "horrible"?

The type-checker will give a very clear warning if it catches you putting a
non-bool in a conditional context. And make no mistake: the type checker is an
important part of the Dart development process.

(One downside of this is that it does push you to working in the -- Eclipse-
derived -- DartEditor, which isn't always a wonderful experience. However, the
type checker is exposed and available, and there's nothing to prevent it being
tightly integrated into other editors or IDEs.)

------
mikehotel
_Going forward, the Dart team will focus on improving Dartium, increasing Dart
performance, and ensuring the platform remains rock solid. In particular,
changes to core technologies will be backward-compatible for the foreseeable
future._

 _Today’s release marks the first time Dart is officially production-ready,
and we’re seeing teams like Blossom, Montage, Soundtrap, Mandrill, Google 's
internal CRM app and Google Elections, already successfully using Dart in
production. In addition, companies like Adobe, drone.io, and JetBrains have
started to add Dart support to their products._

Congrats to the team on releasing 1. Now to find a project to try it out in...

------
ntkachov
This is speculation: but JetBrains work on dart IDE, android releasing ART,
I'm tempted to say we're 2 years out from seeing DART running on android. It
makes sense from a business sense, have the option of running dart apps on
android would free the platform from its java dependance.

~~~
ahoge
The VM already works on Android (x86 and ARM - not sure about MIPS).

~~~
floitsch
The VM works on MIPS too.

------
kodablah
I think Dart has the potential to become a target for other languages [1]. The
already-high-level code has a performant VM and it takes advantage of optional
typing (unlike any other VMs I am aware of). In order to do so though, they
should at least make a spawnString (like isolate's spawnUri) or even better,
have the ability to JIT dart code by string but not execute it right away.

1 - [https://www.dartlang.org/articles/why-not-
bytecode/](https://www.dartlang.org/articles/why-not-bytecode/)

~~~
georgemcbay
Adobe's AVM2 (ActionScript 3 VM) took advantage of optional typing.

Once upon a time this was going to be the basis of ECMAScript4 via tamarin,
but that never panned out for lots of reasons, most of them political.

~~~
camus2
Funny how things would be different today.

ES4 failed mainly because some people thought ES3 was good enough.

Adobe,harshly critized for Flash was the one pushing for a better javascript.

I will never understand why Microsoft basically killed ES4. They had their own
implementation on .net ( JScript.net ) so it's not like it was going to be a
huge effort. The only reason would be Microsoft pushing Silverlight at that
time which was a huge flop. We basically lost a decade because of it, as i
predict javascript will eventually look like ES4,that's inevitable.

~~~
pekk
Javascript lost a decade because of that.

People without an investment in Javascript have lost _over_ a decade because
of Javascript's monopoly on clients being maintained. If we had not been
forcibly locked into Javascript all this time, then competition would have
produced a better alternative or whipped the process designing Javascript into
shape. Now we are stuck with this ridiculously tall, messy stack which uses an
application scripting language as a compile target, still lacks basic features
like a standard package system, and pushes trivial language features like
iteration into third-party libraries like jQuery. So now we are constantly
pushing megs of JS, using insanely complicated build systems to get anything
done, and for all this trouble our code runs at a speed roughly equivalent to
C in 1998.

(Now that Flash and Silverlight are dead I think it is safe for me to complain
about Javascript without being an enemy of the open internet or whatever.)

I don't really care about Dart, but it's way past due that there was something
serious to challenge Javascript. All the triumphalism about how Javascript is
already a perfect language to use for eternity is explicitly
counterproductive. Making the whole internet depend on the fortunes of one
language just sucks.

~~~
pjmlp
> So now we are constantly pushing megs of JS, using insanely complicated
> build systems to get anything done, and for all this trouble our code runs
> at a speed roughly equivalent to C in 1998.

Those who care, just keep happily using plain native applications.

------
tzury
So if i get it right, the way "Google" sees the future, there is Go at the
server side and Dart at client side (which is in fact JS). Am I wrong?

I would expect Google, or at least, a team at Google, to take over NodeJS
which is based on their V8 and expand it to universal server client language
and libs. JS can be complied into go binaries after all, so why not letting
people write apps using the same language.

Let alone I see no effort on their side bringing any of those language into
the native world of Android, instead we got this cluttering Java thing as
almost the only options for most projects.

~~~
RivieraKid
Dart is a better Java (that can run in a browser if you want).

Go is a better C++.

~~~
pwnna
Actually I wouldn't say Go is a better C++.

Rust is a better C++. Go is.. weird. I would even say it is a better Java.

~~~
anon_d
A better Python?

~~~
sigzero
Not really....

------
jalan
I am a newbie in field of Web Development, and recently I felt in love with
JavaScript, especially because of the sheer capability to write Client side
and Server side code in same language. Thanks to Meteor.js, it made my bond
with JavaScript even more stronger.

But now with the buzz of Google Dart going around, I am afraid that, am I
betting on the wrong horse? Is it the right to jump on Google Dart bandwagon?
To be honest, it do looks promising.

Please guide me, what should I do, since I am a newbie, I want to take
advantage of the fact that, since I don't know anything, I better learn
something that have much promising future, and have an edge over technology.

~~~
threeseed
Learn Javascript. Dart is a dead end technology.

ALL the committers are from Google and it is not an open standard which
basically eliminates any chance that Mozilla/Apple will ever consider adopting
it. And frankly with Apple dominating the mobile web without them any solution
will never eventuate to anything.

~~~
ahoge
> _[Dart] is not an open standard_

It will get standardized in the not too distant future. [1]

> _Apple dominating the mobile web_

Huh? Android's market share is over 80%. iOS got about 13%. [2]

[1] [http://www.ecma-
international.org/news/Dart%20workshop.htm](http://www.ecma-
international.org/news/Dart%20workshop.htm)

[2] [http://thenextweb.com/insider/2013/11/12/idc-android-
hit-81-...](http://thenextweb.com/insider/2013/11/12/idc-android-
hit-81-0-smartphone-share-q3-2013-ios-fell-12-9-windows-phone-
took-3-6-blackberry-1-7/)

~~~
threeseed
Android's market share maybe 80% but it is about 50/50 in terms of web usage.

And don't forget that Apple customers are acknowledged as the more valuable
(higher net worth, disposable income, tastemakers etc)

~~~
afsina
Wait until developing word get their smart phones.

------
nfoz
Sad to throw away the brilliance of prototypes to go back to single-
inheritance classes. uck

~~~
mraleph
JS prototypes provide a _single_ parent lookup delegation, which is not that
different from single inheritance and is mostly used to emulate single
inheritance class systems in the wild.

Furthermore Dart supports mixins, so it's not exactly single inheritance
classes.

------
woven
Psyched! See our HN post about our Dart app (Dart rocks) and our team's
disappointment with not being included in the 1.0 announcement.
[https://news.ycombinator.com/item?id=6735044](https://news.ycombinator.com/item?id=6735044)

~~~
munificent
I don't know anything about what went into deciding which companies were
mentioned in the announcement, but I know for certain I and others on the team
have a ton of respect and gratitude for all of the help you and Kai have given
us. Thanks!

~~~
woven
Thank you! And congrats!

------
moca
Some people wanted to build optional-typing language for real world for
decades, and finally made it. That is a great achievement.

From product point of view, Google would be much better to port Android Dalvik
to Chrome. You can run GWT Java code in browser years ago. Running the same
code using JVM would be much faster with much less code change. 5-10 man-year
would be enough to do the porting, and it will share work between Android and
Chrome for years to come. Of course, it would be much boring research work
though.

From performance point of view, asm.js gets much better performance with way
less work. No matter how good Dart performs, it would never make sense to port
high performance C/C++ game code to Dart, so you end up having to use both
Dart + pNaCl, which is an awful solution. Technically, TypeScript is more
interesting if Microsoft can keep it simple and fast, but I doubt Microsoft
would make anything simple.

------
davidedicillo
Would someone who knows HTML/CSS/RoR better of learning Dart or JS next?

~~~
camus2
Even if you use language X that compiles to javascript ,you still need to
learn javascript, Or it's a bit like learning rails without understanding
ruby.

~~~
RobAtticus
I don't need to learn assembly to use C. I don't need to learn the JVM
bytecode to use Java.

Sure for special cases knowing those things can help get the very best out of
your code, but for the other 99% of the time, it is not necessary.

(Edit: Not that I recommend Dart over JS necessarily, but I don't agree with
your argument.)

~~~
coldtea
> _I don 't need to learn assembly to use C. I don't need to learn the JVM
> bytecode to use Java._

But you DO need to learn Javascript to use Dart on web apps, so the comparison
is irrelevant.

~~~
chrisbuc
Why do you need to learn JavaScript to use Dart? You need to understand the
DOM and the browser APIs (presented through Dart libraries), and HTML, CSS,
but you very much don't need to know a jot of JavaScript to build and deploy
Dart or dart2js applications. Even the Dart2js output has sourcemaps letting
you view source in the original Dart.

------
rdtsc
List of companies using it in production (from the blog post):

* Blossom

* Montage

* Soundtrap

* Mandrill

* Google's internal CRM app

* Google Elections

Companies that started to add support for it: Adobe, drone.io, and JetBrains

------
Bahamut
Dart seems interesting, but its sponsorship by Google creates a major problem
- what incentive does Microsoft, Mozilla, or Apple have to implement Dart
support in their browsers? What about JavaScript devs who choose not to
support Dart (especially since many still have to support even as far back as
IE8 due to enterprise/companies/organizations/schools that opt for long-term
support solutions for software)? I don't think good answers are available to
these questions, which makes me hesitant to jump in as quickly.

~~~
klodolph
Dart also compiles to JavaScript, and was designed to do so from the very
beginning.

~~~
Bahamut
It adds complexity to the dev process, and I'm not sure of the benefits of
said complexity. The devs still at the core need to understand JavaScript it
seems like.

~~~
chrisbuc
> The devs still at the core need to understand JavaScript it seems like.

No, that's not the case. You need to understand the browser DOM, and the
various APIs available to you, but these are presented by Dart libraries. If
you have knowledge of Java or C#, then that knowledge will be useful, and if
you have knowledge of JavaScript's functional elements, then that is also
useful, but none of that is mandatory to be effective with Dart.

~~~
Bahamut
But if you're using third party JS libraries and want to integrate with a Dart
app? Seems necessary to still have to understand JS to integrate properly
since you still have to know how those libraries' API works.

------
notok22
I almost finished the Language Tour when I went to the faq and was
dissapointed to see that the dart2js compiler supports only ie9+
([https://www.dartlang.org/support/faq.html#what-browsers-
supp...](https://www.dartlang.org/support/faq.html#what-browsers-supported)).
Too bad, honestly.

~~~
nilliams
Opinion: nobody should be shipping _any_ JS to oldIE, period.

Their JS engines are woeful. Even if you can get something app-like (the kind
of thing you would use dart for) to _work_ , your app won't scale w.r.t. perf
so you're painting yourself into a corner.

~~~
quarterto
That's your opinion and you're entitled to it but people do still have to ship
things for IE6-8.

~~~
nilliams
Understood. I'd just question if it needed JS - if JS actually added to the UX
and outweighed the considerable dev cost.

~~~
threeseed
How on earth do you propose to implement client side functionality without JS
?

The fact is that MANY people need to support IE6-8.

~~~
nilliams
Sample size of 1 etc, this is just my experience.

I personally built a single page application about 2 years ago that _worked_
in IE8, thanks to jQuery and the ecosystem of the time. jQuery, jQuery UI,
various plugins incl. jsTree & DataTables.

It flew in Chrome, Firefox and Opera, even then. In IE8 it was slow as hell.
Event listeners were slow, ajax and parsing JSON was slow. Everything was
crazy slow. The app felt lumpy and awful. And when I hit bugs, the developer
tools just were not there.

I would never do this again.

I'd wager that for IE < 8, for any non-trivial app, round-tripping to the
server will give you a better UX than using JavaScript.

Deliver something _usable_ for oldIE. There are many people that share this
view. I suggest watching this talk on how the BBC deals with legacy browsers
(9m 20s):
[http://www.youtube.com/watch?v=YfvMQ316hMU&t=00h09m20s](http://www.youtube.com/watch?v=YfvMQ316hMU&t=00h09m20s)

------
rayiner
How's the Emacs mode?

~~~
rdtsc
The one I am using (and I don't even remember which one it is or if there are
multiple ones) does basic highlighting. There is no re-factoring support that
I could find yet.

------
tzaman
Why doesn't Google include the native Dart VM in Chrome? I think it would
boost it's usage significantly. Maybe I'm missing a bigger picture.

~~~
afsina
They need make some changes in Chrome for doing this right. They aim to make
DOM nodes garbage collectible with project oilpan [1] AFAIK. Both Dart and V8
VM will benefit from this. So this will take some time. But Dart is already
very useful with Dartium for development and Dart2Js for deployment.

[1]
[https://groups.google.com/a/chromium.org/forum/#!topic/blink...](https://groups.google.com/a/chromium.org/forum/#!topic/blink-
dev/V1vJmirHUGE/discussion)

~~~
kyrra
This is exactly the issue.

They are working on an experimental solution to let garbage collection happen
for DOM nodes that are created from Dart or V8. This basically requires a
rewrite of the memory management of DOM nodes. This is still very much a work
in progress and not ready for prime time.

The solution the team uses for Dartium is not the same as what they want to do
for the shipping version of Chrome, so it'll be a bit before that's ready.

------
protomyth
Is there a downloadable reference manual for the language? I see book
excerpts, but not a complete language reference.

~~~
floitsch
[https://www.dartlang.org/docs/spec/](https://www.dartlang.org/docs/spec/)

~~~
afsina
This is Language spec. not useful for developers. I would suggest downloading
5 links as HTML from here:

[https://www.dartlang.org/docs/dart-up-and-
running/](https://www.dartlang.org/docs/dart-up-and-running/)

------
andyl
Just waiting for "Works best on Chrome"

Silverlight and ActiveX have already shown the usefulness of proprietary
enhancements.

No thanks.

~~~
chrismsnz
What exactly is proprietary about it?

Browser vendors are free to integrate the VM into their products, and if they
don't want to there is dart2js which is acceptable.

This isn't even close to the situation presented by Silverlight, ActiveX and I
feel like you're being duplicitous by comparing them.

~~~
pcwalton
> Browser vendors are free to integrate the VM into their products, and if
> they don't want to there is dart2js which is acceptable.

That's a tremendous amount of effort and it is likely to reduce the
performance of JavaScript. Cross-language GC, in particular, is really hard.
See Filip Pizlo's message to webkit-dev on this subject (citing two recent
papers), which is part of the reason that Dart support was shot down when
Google proposed adding it to WebKit:
[https://lists.webkit.org/pipermail/webkit-
dev/2011-December/...](https://lists.webkit.org/pipermail/webkit-
dev/2011-December/018811.html)

~~~
skybrian
As of today, dart2js is the only way to deploy Dart to users' browsers, Chrome
included. It already performs well enough for most apps.

The Dart VM is nice but its primary purpose right now is running the Dart
compiler and in Dartium which is only used by developers. (You can use it for
other things but the ecosystem isn't there yet.)

