This is a mirror of official site: http://jasper-net.blogspot.com/

The Dart Hello World

| Sunday, October 30, 2011
Via @qrush, a nice analysis of the compiled JavaScript code from a small Dart Hello World gist. Basically, this Dart code:

// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Simple test program invoked with an option to eagerly
// compile all code that is loaded in the isolate.
// VMOptions=--compile_all

class HelloDartTest {
  static testMain() {
    print("Hello, Darter!");
  }
}

main() {
  HelloDartTest.testMain();
}

Compiles to 17259 lines of JavaScript code. Now, most of it is just the library core, but it shows what you have to do to bolt static typing on top of a prototype-based, dynamic, truly object-oriented language.

I don’t really understand the point of Dart personally, it seems like all that’s left is some 100K line XML file to drive behavior, and now we’ve built Java executing in the browser.

Read more: LosTechies
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=lostechies.com/jimmybogard/2011/10/12/the-dart-hello-world/

Posted via email from Jasper-net

0 comments: