2011-10-21, 11:11 PM
In case you haven't heard, Google is creating a programming language called Dart which aims to be a better client-side web language than Javascript. The key difference between Dart and Javascript is that Dart features a type system with classes and interfaces and optional type checking. You can declare variables with "var" like in Javascript or you can use the name of the type like in C or Java. Type declarations are only used by the type checker; they do not affect runtime behavior and the type checker does not normally run at runtime.
You can currently run standalone programs in a VM or compile web page Dart code to Javascript. I'm sure Google has plans to add native Dart support to Chrome.
Dart is completely open-source.
Has anyone tried it or have any thoughts? Personally, I'm thrilled that a language with type checking (even optional type checking) and OOP like I'm used to instead of Javascript's weird prototype stuff is coming to the web. Unfortunately, the ginormous amount of existing Javascript code and the lack of interop between the languages is going to be a huge barrier to adoption. Native browser support will probably be necessary for serious use because Dart's "Hello World" program compiles to 17,259 lines of Javascript! It's also somewhat of a pain to get started with because there are no Windows binaries for the compiler to Javascript; you have to compile from source yourself.
You can currently run standalone programs in a VM or compile web page Dart code to Javascript. I'm sure Google has plans to add native Dart support to Chrome.
Dart is completely open-source.
Has anyone tried it or have any thoughts? Personally, I'm thrilled that a language with type checking (even optional type checking) and OOP like I'm used to instead of Javascript's weird prototype stuff is coming to the web. Unfortunately, the ginormous amount of existing Javascript code and the lack of interop between the languages is going to be a huge barrier to adoption. Native browser support will probably be necessary for serious use because Dart's "Hello World" program compiles to 17,259 lines of Javascript! It's also somewhat of a pain to get started with because there are no Windows binaries for the compiler to Javascript; you have to compile from source yourself.

