29 comments

[ 2.5 ms ] story [ 80.2 ms ] thread
(comment deleted)
It's a great language and with the series of hackathons they planned they will spread the language and help improve it.

I was on at #dart @ Freenode which is their official IRC channel today and the guys at the hackathon were building a way of using Dart to control an Arduino board. Pretty cool stuff.

Dart is such an uninspiring, imagined-in-1995 language that I still wonder if I ever find a use-case for it.

This we-are-from-Google-and-everyone-else-is-stupid approach to language design is imho the real disease (also see the comment on Google Guava, that tells a lot).

I just don't want to develop in a language which throws the last 2 decades of language design experience over board because they designed a language for the lowest common denominator.

EDIT ====

Some people don't know the comment from the Google Guava authors, so here it is: https://plus.google.com/113026104107031516488/posts/ZRdtjTL1...

The problem imho is that this attitude, behavior and world-view is endemic inside Google. (Look at all the NIH stuff written solely because it was non-Google.)

They think YOU are stupid and treat you like a kid, keeping away potentially useful functionality they deem to advanced for you.

Re "decades of language design":

- nulls, even for numbers. Seriously? So there is no efficient integer type which can be mapped to simple CPU instructions, but they also make sure that the arbitrarily sized one is slow without huge investments into VM technology and data flow analysis? Additionally, double is of course fixed length. Just wondering ... shouldn't this be exactly the other way around?

- A totally broken approach to types. The guy designing the language is more or less at war with static type systems. Seems like he is trying to prove a point by designing the most useless, statically-typed-looking system he can come up with. I mean seriously ... they allow people to write types down, but declare that they have no effect at all? Java did that too with the type erasure of Generics and everybody knows how that tiny amount of we-will-ignore-the-stuff-you-wrote worked out. Now extrapolate to a language which does that for everything.

- Single-implementation inheritance. Even the COBOL of language design (Java) is moving away from it. Designing a language in the 21st century lacking traits ... are they kidding me?

- Conflation of Null, Unit/Void and Bottom/Nothing.

IMHO, Dart is more or less a combination of all bad ideas of Java (poor Collection libraries, user-visible type erasure, semicola ...) and JavaScript (untyped, collection literals, no usable concurrency ...)

Really, Dart is like PHP. It is a hoax fooling people to believe it is a programming language. For instance: "If the last statement of a function is not a return statement, the statement return null; is implicitly appended to the function body." REALLY? Who in his right mind comes up with ideas like this?

Or this: "Type void: [...] On the other hand, it is possible to return the result of a void method from within a void method. One can also return null; or a value of type Dynamic." Are they KIDDING me?

Another one: "It is a compile-time error for any type other than the types int and double to attempt to extend or implement num." So not only are the provided types the most unfortunate combination imaginable, but the also make it hard for people who want to provide their own number types?

What the Web would have needed was a module system and an approach to security (because the current HTML5/JavaScript implementations of browser vendors lack any thought about it).

Sorry, if I got a bit aggravated at the end, but such remarkable bad language design just infuriates me, especially if it doesn't arise because the language designers are stupid but because they think their users are stupid.

care to elaborate?

I'm not a DART developer, but by checking out this: http://synonym.dartlang.org/ it seems to me that the language is doing some great things: Getting rid of "undefined", adding a class+extend, optional params are much better compared to JS, jquery-like DOM querying.

The very first example there says

> // Note: This will only work in Dartium (a build of Chromium with Dart VM)

This isn't a temporary issue. Google might add the Dart VM to Chrome, but the chances of it showing up in any other browsers are close to 0.

Aside from that, yes, Dart improves on some syntax issues like you said. But the compiling-to-JS approach lets you do a lot more, you can write CoffeeScript or C++ or C# or Java and compile those to JS as well.

That snippet is showing a comparison of JavaScript and Dart as native languages. To get the Dart sample to work in browsers without native Dart, just add this tag:

    <script src="http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"></script>
Try dropping the FUD.
The fact remains, proper integration of Dart - the way the very first example wants to show us - will not work in any browser but Chrome+Dart. It's a problem for any language that wants to run in a web browser except for JS.
It's great to see the other side of the story, at least. You could tone down your words and maybe present some facts, but I'm sure everyone appreciates your contribution either way.
Thanks. I updated my original comment.
> also see the comment on Google Guava, that tells a lot

What comment on Guava? I just googled "guava sucks" and came up with nothing.

IMO, Guava is absolutely _fantastic_, and they're improving it all the time. If people are thinking otherwise, that's news to me and I'd like to hear why.

It would be helpful if you could elaborate some on why you think that Dart:

- has a "we-are-from-Google-and-everyone-else-is-stupid approach" - "throws the last 2 decades of language design experience over board"

because neither of those things seem obvious to me.

You do realize that Dart is not just a new, from-scratch language aimed at solving all of our pain points with current PLs, right? Dart is a product of it's environment, which more than Google is the current web stack and web programmers.

Dart's number one constraint is that it compiles to fast JavaScript. Dart's number two constraint is that it's familiar to JavaScript/Java/C# programmers. Dart's reason for being is to solve problems that arise when trying to write large applications in JavaScript, and to solve those issues faster than TC39 is. Being innovative compared to Java and JavaScript is further down the list.

If you know those things, then you might understand some of the design decisions:

Nulls, and optional typing? That comes out of the first constraint. "Boring" syntax, from the second. Inheritance? Familiar to Java/C# programmers, not to mention that many people mess up prototypal inheritance and many others use incompatible class systems. Not allowing user-defined implementations of num and String? Efficiency.

Also, just because some innovative features aren't there now doesn't mean they won't arrive either soon or eventually. Method cascades are being implemented so every API can be fluent like jQuery. Mirrors are being implemented for reflection. Pattern matching, mixin, and non-nullable type proposals are circulating. The server and browser APIs and libraries seem to be converging as time moves on.

Dart's a fine language for what it's aimed at. It's a huge step up from JavaScript. If you actually try it, you might very well like it compared to your other options.

When you're able to take Dart and reliably, run it on both the server and the web client then it may be interesting. Right now I don't see a good use case for it right now.

For one, debugging client-side code is going to be annoying especially if you end up running into a bug due to the Dart to JavaScript translation. You're going to have to know Dart and JavaScript well in order to debug effectively.

The other side of the coin, server-side, as far as I can tell isn't really ready for prime time (at least that's what the Dart language website says unless I'm misunderstanding them).

Neat idea but I don't see the practicality yet. In all honestly I don't understand the trend to move away from JavaScript especially when all it does is translate into JavaScript. That seems like an extra layer of abstraction that isn't very useful to me especially in debugging.

It won't be "finished" (ready for ACTUAL deployment) for at least a year or so. The dev team is pretty small and the funding is pretty small.

The way dart works is that it compiles into optimized javascript that the average javascripter wouldnt end up writing. The resulting code is weird and wacky, but it usually works. From my own understanding, that's the cool part.

Not particularly impressed with the Dart comparisons to JavaScript on http://synonym.dartlang.org/.

I'd rather use CoffeeScript.

Besides I'm not about to embark on yet another experiment, as a guinea pig, with Google.

You're looking only at a part of the whole picture. Dart's vision is to offer a complete framework and hence you should not judge it only based on the language and syntax.
The article is basically marketing fluff.

And the main reason to not use Dart is alluded to in a quote in it,

> Dart compiles to JavaScript, so your Dart web apps will work in multiple browsers (not just ours).

which is misleading, since to that should be added "but they will run much more slowly in IE, Firefox, WebKit and Opera", because none of them will embed the nonstandard Dart VM, only Chrome will.

Personally unlike many people (even Dart guys) I care less about Javascript-Cross Browser compatibility. I would not mind if things work faster only in Chrome. Once there is a version of Chrome in IPhone and WP7, all bases are covered. It would be a good platform to develop.
There will never be a version of Chrome for iPhone and WP7 (nor Firefox, nor full Opera, etc.).
Windows 8 it is then.
I actually thought that the article was a joke (no offense). It starts off saying "... how you can become more productive and happier", and then:

- libraries are needed. And then it proceed to describe how if you want to get something done you have to reinvent the wheel, or port it (which amounts to the same insofar as it slows you down)

- Weekly updates (in particular the bit on downloading the new build and trying out the new features). How exactly does having to check for new features (and test them) makes me write better code, faster?

- ".. the code becomes a hell to understand. With the Dart syntax, this is a bit more difficult.." Really? I'm sure this one is a typo. Or I'm missing something.

Now don't get me wrong, I'm not saying that Dart is not cool, or anything (I haven't tried it). But based on the arguments in the article, I simply don't see how exactly the language is a productivity boost..

I've got same impression. It was really funny to read this.
The website says ... "One of the biggest advantages of Dart is the vibrating community..." . I'm quite curious to know about this vibrating community. Am I missing something exciting here?
Haven't you heard? The community is abuzz.
I thought they said "sharting"..and I was thinking to myself..but I already started!
I have to say, being a non-coder... it must be so incredibly difficult to know how to start any given project with the countless languages out there.

Perhaps it's less messy than I imagine: maybe many of the trendy named languages are just minor modifications or bridges between standards? Anyway impressed you all negotiate this minefield so well.

As someone who wants to start to learn to code to build some basic web UI it certainly is difficult to know where to start!