Friday, November 18, 2011

Dart, Structured Web Programming by Google

Gilad Bracha, software engineering from Google, is presenting an overview of Dart, a new programming language for structured web programming. Code example links are posted at the end.

Gilad Brache on Dart

Dart is a technology preview, so this it open to change and will definitely change. On today's Web, developing large scale applications is hard. It is hard to find the program structure, there is a lack of static types, no support for libraries, tool support is weak and startup performance is bad. Innovation is Essential. Dart tries to fills a vacuum; the competition is NOT JavaScript… but fragmented mobile platforms are. So, what is Dart?

  • A simple and unsurprising OO programming language
  • Class-based single inheritance with interfaces
  • Has optional static types
  • Has real lexical scoping
  • It is single-threaded
  • Has a familiar syntax

You can try Dart online at: http://try.dartlang.org. Dart has a different type checker. In other programming languages, a conventional type-checker is a lobotomized theorem prover, i.e. it tries to prove the program obeys a type system. If it can't construct a proof the program is considered invalid; "Guilty until proven innocent". In Dart, you are "Innocent until prevent guilty".

In Dart, types are optional (more on optional types). During development, one can choose to validate types but by default, type annotations have no effect and no cost… the code runs free!

There are no threads in Dart. The world has suffered enough with threads. Dart has isolates. They are actor-like units or concurrency and security. Each isolate is conceptually a process, nothing is shared and all communication takes place via message passing. Isolates support concurrent execution.

Dart Execution

On Dart performance, when translated to JavaScript, it should be at parity with handwritten JavaScript code. On the VM, it should be substantially better.

In conclusion, Dart is not done yet. Every feature of every programming language out there has been proposed on the Dart mailing list, however, Google has not taken any decision on these yet. By all means, go check out the preview, try it out and participate!

Some code examples


You can learn more about Dart at http://www.dartlang.org/

4 comments:

  1. That was not in your planning...

    ReplyDelete
  2. True, in all three days I did not include the keynotes in the planing as everyone attends the keynotes :) Check it out: http://qconsf.com/sf2011/schedule/friday.jsp

    ReplyDelete
  3. Thanks for sharing, I will bookmark and be back again

    Web Development San Francisco

    ReplyDelete
  4. Hi Kumari, as the QCon SF conference is over, I'm not sure we will be posting much more content on this site, however, any discussion or comment will definitely be replied to.

    ReplyDelete

Note: Only a member of this blog may post a comment.