Google Starts to Detail Dart
MrSeb writes "After waiting for more than a month, Google has unveiled its mysterious Dart programming language... and you're going to kick yourself for getting so preemptively excited. Dart is a new programming language that looks like Java, acts a lot like Java, runs inside a virtual machine like Java... but ominously, it also has a tool that converts Dart code into JavaScript. Language-wise, its features are unlikely to knot your panties: there are classes and interfaces, it is optionally typed (you can switch between untyped prototype code to an enterprise app with typing), the syntax is very lackluster, there's a very strong concurrency model, and Google is promising lots of juicy libraries that can be leveraged by developers. Basically, the language isn't meant to be exciting: in Google's own words, it's designed to be 'familiar and natural' — and indeed, if you write Java or C# code, Dart will probably feel very approachable."
.... but ominously, it also has a tool that converts Dart code into JavaScript.
Sounds pretty mundane to me- What's so ominous about converting to JS?
The world actually needs more "enterprisey" languages. If you want experimental, fun languages, your choices are actually very good, what with ruby, python, and a ton of functional languages. In terms of safe and good for scalable, risk-averse environments, there's pretty much just Java and C#. Java seems to have accumulated so much inertia, it doesn't add new features anymore. As for C#, the problems dealing with Microsoft are well-known to the slashdot community already.
A little more competition in that arena would do the industry some good.
Both the article and the summary don't seem to get it. This sounds like C#.NET take two, with the added trick that until browser support for the real Dart is there, you can deploy by translating your client side Dart code to JavaScript.
The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively, both of which have repeatedly shown to not play nice with the open source developer community, have used patents aggressively and care very little for open standards.
Even mono is not open enough to allow usage in many embedded devices (read: game consoles) without paying royalties, due to the GPL license.
A replacement for those that is portable, can be used everywhere, is easy to migrate to and is distributed by the very permissive licenses Google always utilizes sounds extremely good in my view, so I think the negative tone of the summary is misplaced..
It can be cross-compiled to JavaScript. So every browser will be able to support it right off the bat. Of course it would be slower than native Dart support.
but ominously, it also has a tool that converts Dart code into JavaScript
No, that's an excellent feature. Allows us to start developing sites with this new language without having to wait for all browsers to upgrade or to have plugins installed. How else would you get any sort of main stream takeup of a javascript replacement?
...with first class functions. So it's not java, thanks for playing.
On second thought, let's not go to Camelot. It is a silly place.
The main problem of Java and C# is that they are controlled by Oracle and Microsoft respectively
But Dart is controlled WHOLLY by Google. Why is that really any different or better?
The reality for Java is much better, it's controlled by a community standards body (the JCP). Oracle can provide direction but they are NOT in control the way Microsoft and Google are.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Java = Statically, strongly typed language (like C# .NET) with classical inheritance, compile time safety etc.
JavaScript = Dynamically typed language with first class functions with prototypal based inheritance, some runtime safety
Dart = Dynamically typed language with first classes functions, but with some support for static types & classical inheritance, still runtime safety/error checking, no compiling etc.
Dart is more like JavaScript than Java. It's been touted as a JavaScript replacement, not Java. Although, just like JavaScript and Java, it can be used for more than just browser based client-side web apps.
The ominous part of that memo is "The cyclone of innovation is increasingly moving off the web onto iOS and other closed platforms." By which they mean iPhone and Android "apps". "Apps" are not a very good environment, and many of them are just web pages with delusions of grandeur. But that they have a payment model, DRM, and give the app distributor absolute control.
It's all about screwing the end user. "You're the product, not the customer".
As a language, Dash looks mediocre, as the article points out. "Optional typing", an idea that started with Visual Basic is usually a lose in language design. Statically typed languages have been successful, and dynamically typed languages have been successful, but optional typing is usually an afterthought bolted on to increase performance at the cost of programmer confusion. There's a typed Python variant, for example; PyPy is written in it. It's rarely put in a language from the beginning.
A few languages have tried a form of soft typing, where you have, essentially,"integer", "real", "boolean", etc., and arrays of same, plus "object". That way you get efficient code for machine arithmetic, which means you can do codecs and graphics in the language. Objects have to be dispatched anyway, so a performance penalty there isn't so severe.
Seems to me DART is meant to replace the ubiquitous PHP/Javascript combination. Think about it: quick prototypes with untyped code, moving to static typechecking wherever wanted, Server-side and client-side execution, built-in HTML5 DOM library. Its features may be unexciting, but they could provide an easy escape from PHP/Javascript hell without too much learning curve.
If that is Google's primary target with DART, it may prove to be a very strategic move.
Its designed to run both client-side and server-side.
If Google would have spent time and effort on Parrot or helped to release a VM that interprets multiple languages under the MIT license, I would be loving Google. Another scripting language and VM doesn't make me warm, fuzzy, or even remotely interested.
Having to work for a living is the root of all evil.
There are several dozen languages that can be cross-compiled to JavaScript today. So far, none of them have become popular as replacement for JS in the browser.