

Dart Lang 1.2 Released - WoodenChair
https://www.dartlang.org/

======
afsina
Here is the announcement page:
[http://news.dartlang.org/2014/02/dart-v1-2.html](http://news.dartlang.org/2014/02/dart-v1-2.html)

And release notes:
[https://groups.google.com/a/dartlang.org/forum/#!msg/announc...](https://groups.google.com/a/dartlang.org/forum/#!msg/announce/Pm0DH7B6V6Y/BDD-
ArOJsf4J)

------
themckman
Working on a project that I kind of want to use the same language for the
frontend and the backend. There's, obviously, vanilla JS, maybe clojure and
clojurescript, but Dart...

For some reason I never realized it could be used server side. Anyone have any
practical experience with an app built entirely in Dart?

~~~
xxgreg
It works. There are a few people using it server side. There is a Heroku build
pack. The HTTP server is a bit slow, sounds like this is being addressed, and
shouldn't be a limiting factor. I wrote a postgresql driver, which works ok.
More users, issues filed and patches are always welcome ;)

------
fidotron
Politics aside, I find it interesting Dart isn't getting much traction at this
point. It seems it should be in a similar position to Java during the first
wave, but it clearly isn't.

By itself it's clearly not bad, it's just not better enough than what is there
already to suffer the inter-ecosystem pain with native JS. Since it can't do
anything JS can't the only selling point it really has is to build large JS
systems in some other safer language, but we've been there before with GWT,
and that didn't set the world on fire either.

~~~
RamiK
Java (Vs. Visual C++) had the industry and Academia trying to break free from
Microsoft's grip by going cross-platform and later in-browser.

Dart just doesn't have that kind of driving force going for it.

~~~
fidotron
True, I had missed that.

Maybe it's that environments mean much more than languages, and with Java the
JVM was the killer thing which dragged the language with it. Spark might be
that killer platform for Dart, but it strikes me as wishful thinking,
especially with players like github coming into that side of the market.

------
gtaylor
I've been working on a Dart project ([http://frontiermap.s3-website-us-
east-1.amazonaws.com/](http://frontiermap.s3-website-us-
east-1.amazonaws.com/)) with StageXL, a Dart transcription of ActionScript's
library: [http://www.stagexl.org/](http://www.stagexl.org/)

I've been meaning to write a blog post on my experience with Dart and StageXL,
but as far as the Dart part of things, a few misc. observations:

* Dart shows a lot of influence from Java, and obviously some tinges of JS. I don't really care, I wanted a productive web language with optional static types.

* It is a "boring" language in that it's not doing anything new or earth-shattering syntactically or conceptually. This ended up being a positive to me, in that I was able to ramp up extremely quickly. I'm a Pythonista by trade, I know enough JS/CoffeeScript to get by, and I've got a little bit of Java experience.

* Dart comes with so many tools, to the point where I'm not constantly trying to find and piece together core components like "module" imports, package managers, unit test frameworks, documentation generators, IDE. Not all of the tools are extremely polished at this point (their package browsing/searching site is incredibly basic), but there is a clear "way" to do most things. There's nothing stopping anyone from writing alternatives to the official stuff, either.

* The Dart->JS interop is OK for simple usage cases, but can get a bit complex for others. This is my only big hangup for non-hobby projects. This will improve with time, but it's very clunky for now.

* Types don't have to be specified, but I have tended to provide them for everything. I really like being able to do this, even coming from a Python background.

* The Dart IDE is surprisingly helpful. Debugging is decent, and they've stripped a ton of the bloat out from its Eclipse underpinnings. It does crash a bit on Arch Linux with the latest Oracle Java, though. That said, I hope they get in with the IDEA guys like they did for Android.

* My particular project uses WebGL, and I'm compiling to JS. I have yet to run into any complications with the conversion, and the generated JS has worked well on my two mid-range dev machines (Linux and Mac OS 10.9 on Chrome and Firefox).

* The error messages shown during interpretation/compiling are helpful most of the time, but can get a little more cryptic in certain cases (I've yet to find a pattern, but there probably is). I expect this to improve with time.

Overall, I have been very pleased with Dart, and like it (as a langauge) a lot
better than CoffeeScript. Optional types has been my favorite feature, and I
really like how "batteries included" Dart is. I'm a backend guy, so I don't
have the drive or mental bandwidth to go looking at the various
packaging/importing/testing/doc utils in JS land (although that is a perfectly
viable approach if you have the time and experience).

The ecosystem obviously can't be compared to JS, since Dart is in its infancy.
It'll be good enough for some usage cases, but you may find yourself re-
inventing things for others (or shoe-horning things in via the JS interop).
For hobby projects, Dart is going to get the nod over the alternatives
(Typescript, CoffeeScript, pure JS) until it burns me.

~~~
greggman
What if anything makes Dart better than say ES6 or ES7 or whatever version of
JavaScript that adds optional types, generators, etc...

~~~
kyrra
Dart is usable now. ES6 has long been delayed, and who knows when ES7 will be
available for mass usage.

There are lots of intro pages out there to get you a little more familiar with
it [0][1][2]. Dart as a language spec isn't all that deep, and it tries to
keep things simple and easy to use. A lot of the power I feel like comes from
the library and tools that come with the language.

[0] [http://programming.oreilly.com/2013/05/dart-is-not-the-
langu...](http://programming.oreilly.com/2013/05/dart-is-not-the-language-you-
think-it-is.html)

[1] [https://www.dartlang.org/docs/dart-up-and-
running/contents/c...](https://www.dartlang.org/docs/dart-up-and-
running/contents/ch01.html)

[2]
[http://en.wikipedia.org/wiki/Dart_(programming_language)](http://en.wikipedia.org/wiki/Dart_\(programming_language\))

~~~
kyrra
To add a few more useful links. Language spec[0][1] is available under a free
license and they welcome input on it[2]. The 3 top starred bugs in their
bugtracker are: enums, non-nullable types, and "await" support [3], though I
don't expect non-nullable types to ever be added, but they like hearing what
is important to programmers. If there is really a killer language feature that
people want, starring it will increase it's chances of being considered.

[0] [https://www.dartlang.org/docs/spec/latest/dart-language-
spec...](https://www.dartlang.org/docs/spec/latest/dart-language-
specification.html)

[1]
[https://code.google.com/p/dart/source/browse/trunk/dart/docs...](https://code.google.com/p/dart/source/browse/trunk/dart/docs/language/dartLangSpec.tex)

[2] [http://news.dartlang.org/2014/02/standardizing-dart-1st-
ecma...](http://news.dartlang.org/2014/02/standardizing-dart-1st-ecma-
tc52.html)

[3]
[https://code.google.com/p/dart/issues/list?can=2&q=&sort=-st...](https://code.google.com/p/dart/issues/list?can=2&q=&sort=-stars&colspec=ID%20Type%20Status%20Priority%20Area%20Milestone%20Owner%20Summary%20Modified%20Stars)

------
lukasm
I'd love to see dart going mainstream, but nobody would integrate VM, except
google.

~~~
melling
It doesn't matter. It compiles to JS and you still get a better language in
which to develop large apps. The generated JS is probably faster because of
the static analysis.

~~~
lukasm
Of course it does. Extra abstraction that may cause pain in fixing nasty
production bugs, can't use goodies from Dart jak SIMP etc. Logically it
doesn't matter, but empirically that doesn't happen.

------
tarpden
Is pub.dartlang.org Dart's "CPAN"?

I don't know Dart, but it looks as if you need a Google account to upload
packages to that central package repo. Is that correct?

------
puppetmaster3
Comparing TypeScript to Dart, one is clearly much better.

~~~
discreteevent
Would you like to share the answer with the rest of the class?

~~~
puppetmaster3
My comment was for the people that tried both, not bait for the people that
know one and not the other.

------
stefantalpalaru
It's "Dart" not "Dart lang" just like it's "Go" not "Golang". Let's keep SEO
out of common language.

~~~
Lambdanaut
sudo apt-get install golang

~~~
stefantalpalaru
emerge go

------
andyl
Dart: Google's ActiveX

~~~
haberman
Dart is nothing like ActiveX. But apparently it is "cool" to invoke ActiveX
for any browser technology you don't like.

ActiveX was a way of loading untrusted binaries in-process with the browser
and running them unsandboxed.

Does Dart run untrusted machine code unsandboxed? No.

If Dart is Google's ActiveX, then JavaScript is Netscape's ActiveX, Java is
Sun's ActiveX and Emscripten is Mozilla's ActiveX. (Note: none of these is
actually true)

Comparisons to Silverlight or Flash would also be inaccurate, since neither
can compile to JavaScript and both are closed-source technologies that are not
on any path to being standardized.

~~~
Touche
Dart is Google's JavaScript. JavaScript was developed exclusively by Netscape
and forced upon the web because of their dominance. Everyone agrees in
hindsight that it was bad to do it that way. And now today Google is
attempting the same thing.

~~~
coldtea
> _Everyone agrees in hindsight that it was bad to do it that way._

I, for one, don't. Better Javascript, with all its warts, than the W3C taking
10 years to create some standard language that was a comitee monstrocity (as
they used to do a lot, until HTML5).

