
Dartium: Google’s New Dart Programming Language Comes to Chromium  - Straubiz
http://siliconfilter.com/dartium-googles-new-dart-programming-language-comes-to-chromium/?utm_source=feedburner&utm_medium=twitter&utm_campaign=Feed%3A+SiliconFilter+%28Silicon+Filter%29
======
ConstantineXVI
I hope Google isn't going to solely rely on Chrome having a Dart VM to
increase Dart performance. As it stands; no other browser is interested in the
Dart VM, so your app will only benefit from the speed in Chrome while other
browsers are at the mercy of the efficiency of the Dart->JS compiler. If the
compiler can produce near-JS performance I wish them and Dart developers well,
otherwise using Dart will only handicap you in other browsers. Chrome has a
respectable market share on the desktop, but mobile will be dominated by
Safari and Android's stock browsers for at least another year (Chrome-Android
is ICS only); thus you're at a complete disadvantage on mobile.

~~~
espeed
I wonder if Google had Firefox-Dart support in mind when they put together the
deal to pay Firefox $1 billion over the next three years
(<http://venturebeat.com/2011/12/22/google-firefox-deal/>).

~~~
dchest
No. People from Mozilla here on HN said that this deal doesn't influence
technical decisions.

------
js2
Blog spam - [http://blog.chromium.org/2012/02/tech-preview-of-chromium-
wi...](http://blog.chromium.org/2012/02/tech-preview-of-chromium-with-
dart.html)

------
afsina
I for one welcome Dartium. I need to learn the language and JS compilation was
an unnecessary barrier. I care less about people's whining.

A language that does not suck? Check. Is it multi platform? Check. Can it work
in other browsers if necessary? Check. Is it open source? check. Can it run in
server? Check. Is it fast? Check.

~~~
tikhonj
That sounds like a checklist for JavaScript too...

~~~
firefoxman1
My thoughts exactly. How about:

Does it have closures and functions-as-object passing? (amazing feature of js)

Does it support prototypal inheritance? (also great)

I honestly don't know if Dart does these two, but they're pretty important to
me. Does anyone know?

Edit: after a little research it looks like the answers are "Yes" and "No".
I'd be willing to try it then.

~~~
spankalee
> Does it support prototypal inheritance? (also great)

No. Dart has classical inheritance, which by the large number of classical
inheritance libraries for Javascript, is still very popular even when
prototypal inheritance is available.

I personally abhor prototypal inheritance. It's aesthetically unappealing,
hard to reason about, hard to optimise, and turns what is usually a
declarative pattern into an imperative one. When most people are approximating
classical inheritance anyway, that's a big sign.

It's sometimes nice that objects can differ structurally from their class, but
I've never found it that useful.

~~~
firefoxman1
Ah, you are right, it doesn't support prototypal inheritance.

 _"When most people are approximating classical inheritance anyway, that's a
big sign."_

Two things on that:

1\. Most people (vast majority) learned OOP in a classical style, so that's
what they're going to be comfortable with and will try to implement. It
doesn't automatically mean classical style is superior.

2\. You may want to check out the Klass library[1]. It provides a _"classical
interface to prototypal inheritance."_ So perhaps classical style is easier to
use, but prototypal is better to have in the background.

[1]<https://github.com/ded/klass>

~~~
spankalee
Why is it better to have prototypal inheritance? What real problem does it
solve?

------
melling
How much faster can we expect Dart apps to run with the VM vs JIT'ed
JavaScript? If we can get a 5x-10x boost, I think a lot more will become
possible in the browser. At some point, I would hope Webkit and Firefox would
adopt it. Why not?

~~~
zoips
If Google was only interested in putting a faster language into Chrome they
could have just shipped with LuaJIT for Lua and been done with it. Obviously
they're more interested in playing around in their own sandbox (Dart).

------
bickfordb
It's good to see alternative web programming languages! I hope the other
browsers will add support for Dart and that other languages will follow.

~~~
Erunno
The WebKit maintainers already refused adding Dart support on grounds of not
being a web standard, not wanting to fragment the web any further and not
wanting the extra maintenance burden for the changes required to WebKit in
order to support multiple scripting languages. Same reasoning goes for
Mozilla, especially because they don't see Dart solving any problems that
either couldn't be solved in a future version of JavaScript or that warrant
the pains of having to maintain two different scripting engines. AFAIK Opera
also didn't show any interest in it.

So Google's only hope left is for Chrome to gain monopoly-level market share
to simply force the remaining browsers into compliance.

~~~
dchest
The WebKit maintainers refused to add support for adding other languages for
the script tag, not Dart. Such possibility is specified in HTML5 (and
previous) standards:
[http://www.w3.org/TR/html5/scripting-1.html#scriptingLanguag...](http://www.w3.org/TR/html5/scripting-1.html#scriptingLanguages)

I point this out because it's an important difference.

------
steele
no thank you.

------
mistercow
I wish Google would just embrace CoffeeScript instead of this. It's a prettier
language, and already solves many of the problems Dart is concerned with.

~~~
sek
The primary goal of dart is speed.

~~~
mistercow
If you look at the stated design goals for Dart:

[http://www.dartlang.org/docs/technical-
overview/index.html#g...](http://www.dartlang.org/docs/technical-
overview/index.html#goals)

Performance is _a_ design goal, but it is not given as the _primary_ goal.

Of course, a cynical observer might say that the real primary goal of Dart is
to give Chrome an artificial performance advantage over competing browsers,
since that will be, at the very least, an _initial_ effect if Google succeeds
in promoting its adoption.

~~~
slewis
Google doesn't care if Chrome is perceived as faster. They want the entire web
to be faster. They use Chrome to push the envelope.

~~~
ootachi
I think you're pretty naïve if you think that "Google doesn't care if Chrome
is perceived as faster". That's been the entire thrust of their marketing,
quite literally from day one.

~~~
sorenbs
As it stands today a Chrome user is no more valuable to Google than an IE user
(well, apart from google being default search provider). But any web user
today is more valuable than a web user 3 years ago because the browsers
deliver a much better experience now, causing the user to spend more time on
the web. Chrome played a major part in this development.

~~~
georgemcbay
"As it stands today a Chrome user is no more valuable to Google than an IE
user (well, apart from google being default search provider)"

I'm not sure your caveat is needed -- on a new installation the first thing
Chrome does is ask you what search provider you want to use, you're just as
free to pick Bing as Google.

~~~
mistercow
Chrome does this, but IE does not. That alone means that a much higher
proportion of Chrome users will use Google than IE users. Then factor in the
relative name recognition for the two search engines...

