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.
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.
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.
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.
> // 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.
<script src="http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"></script>
Try dropping the FUD.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.
- 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.
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.