News for hackers. Stuff that matters.
Re:Chrome 28 arrives with Blink, rich notifications for apps by jrockway on Wednesday July 10, 2013 @10:47AM (#6020032)
I'm pretty sure dart2js runs faster than Dartium. Dartium is just for reducing the time the edit/test cycle takes and from what I've read on the mailing list, not intended to be something that end-users will ever see. In that respect, Dart is exactly like CoffeeScript or the many other attempts to fix Javascript.

The Dart FAQ says:

Q. Is Dart going to divert community effort from JavaScript-based web development?

If people like Dart and use it, then to a certain extent, yes, but isn't this true of any improvement to existing web development? Nothing is zero-effort to learn or 100% back-compatible to legacy browsers, so people use both new and old. You might look at it this way: Google is putting significant effort behind both Dart and JavaScript, choosing to develop Dart while at the same time using JavaScript extensively, and working on JavaScript tools, implementation, and language spec. We're doing both because we think Dart is worth it.

Server-side web programming finds room for many languages: does Python divert effort from Perl, and does Java undercut C++? Again, to a certain extent, yes they do, but people generally consider that a healthy situation, better than if we all used a single programming language. Multiple languages have allowed for faster change than any single language has achieved through a standards process. Furthermore, languages coexist in different niches: does Groovy really compete directly with C++? People face different engineering tradeoffs and choose different languages to meet them. Ultimately, we think client-side developers should have this kind of flexibility.

Q. Is Google planning to put Dart under the control of a standards body?

Yes, we hope to. Once Dart reaches a certain level of maturity and acceptance, we expect that a standards process will be the next step.

As for the various APIs you describe above, those are all for packaged apps, which really have nothing to do with the web except that they happen to run inside Chrome. It's like complaining that iOS in-app purchases go through Apple, or that Gnome has Bluetooth support. (Or even that Firefox extensions don't work in Safari.)

Re:Chrome 28 arrives with Blink, rich notifications for apps by coldtea on Wednesday July 10, 2013 @12:45PM (#6020985)
>I'm pretty sure dart2js runs faster than Dartium.

Not according to the benchmarks they give:

http://www.dartlang.org/performance/

Dart VM (Dartium) is about 2x as fast as Dart2JS (which is around 80%-90% of JS).

Re:Chrome 28 arrives with Blink, rich notifications for apps by jrockway on Wednesday July 10, 2013 @02:46PM (#6021925)
You're right. I'm still pretty sure Dartium isn't supposed to end up in the hands of end-users, but is more of a benchmark to see how much dart2js can be improved. But since this is HN and there are always the conspiracy theorists around, I really have no idea what the plan is.

(Remember that you can write server-side software with Dart, too, so the VM can exist for that purpose without being some evil scheme to eliminate Javascript. Not that I would mourn the passing of Javascript :)

Re:Chrome 28 arrives with Blink, rich notifications for apps by coldtea on Wednesday July 10, 2013 @04:55PM (#6022738)
>You're right. I'm still pretty sure Dartium isn't supposed to end up in the hands of end-users, but is more of a benchmark to see how much dart2js can be improved. But since this is HN and there are always the conspiracy theorists around, I really have no idea what the plan is.

I'm not sure. If that was the case, I don't think they'd put a hot ass team (including Lars Bak IIRC) on the Dart VM and spend millions on it.

I believe Google would very much like Dart (the VM) to succeed, but they know that realistically it can not for now, and so they invest in the JS translation in order for it to be a credible player.

As you mention, one way that Dark can make a dent, though, is on the server side. It's a decent dynamic language, that's an order of magnitude faster than Python/Ruby. With enough library support, it can get places that even node, tied as it is to the async callback model, might not. A decent web framework, for example, could have Dart see a lot of adoption.

That said, it's still too early to tell -- it's not even out of beta yet.

Re:Chrome 28 arrives with Blink, rich notifications for apps by patrickaljord on Wednesday July 10, 2013 @03:29PM (#6022218)
The whole point of dart is to have a dynamic language for the web that is type-safe and super fast by default. If Dartium never gets into Chrome, then that would make Dart kind of useless. The plan is to implement Dartium into Chromium once Darts stabilizes.
Re:Chrome 28 arrives with Blink, rich notifications for apps by jrockway on Wednesday July 10, 2013 @06:24PM (#6023206)
Dart is already very useful, so I disagree with that assertion. It's the Dart compiler that handles type-checking, not the runtime. If you write "String foo = 42; return foo + 8;" and compile without type checking, you generate code that will work fine. But if you turn on type-checking, you get the type error at compile-time.

Furthermore, the compiler is responsible for resolving the dependencies your main program uses ("tree shaking" to remove stuff you don't actually use [1]), so there has to be a compiler even if your browser had a Dart VM built in.

[1] http://blog.sethladd.com/2013/01/minification-is-not-enough-...

I use Dart because it allows me to organize and test my code in a way that is very inconvenient with Javascript. Any speed improvements or IDE support is incidental, I have not yet had any speed problems in Javascript and I don't use their IDE :) The type-checking, library system, and the language itself is wonderful, though.