Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dart: Preview

Ladislav Thon
December 13, 2011
81

Dart: Preview

Ladislav Thon

December 13, 2011
Tweet

Transcript

  1. • Javascript has fundamental flaws that cannot be fixed merely

    by evolving the language. • Dash is designed with three perspectives in mind: ◦ Performance, Developer Usability, Ability to be Tooled • Dash is also designed to be securable • Dash will be designed so that a large subset of it can be compiled to target legacy Javascript platforms https://gist.github.com/1208618
  2. • familiar ◦ both to Java and JavaScript developers ◦

    conservative and progressive • serious ◦ more than 70 committers (from Google)! ◦ Gilad Bracha, Josh Bloch, Lars Bak, Peter Ahé • open Dart is
  3. • functions ◦ Lisp for human beings • event loop

    ◦ async programming ◦ GUI • extensibility, expressive power JavaScript: The Good Parts
  4. • optional types • arbitrary precision int (+ usual double)

    • constants • named constructors and factories • named and optional parameters • properties (getters and setters), operators • interpolated strings • higher order functions, lexical closures • parameterized classes (reified) • event loop • isolates (actors) and message passing Dart does have
  5. • specification • own VM (without bytecode) ◦ API for

    embedding • compiler to JavaScript written in Java • compiler to JavaScript written in Dart • IDE based on Eclipse Dart does have
  6. • sound type system • variadic functions • public/protected/private •

    enums • method overloading • threads and shared memory • LINQ • generators, list comprehension • pattern matching • extension methods, traits, mixins, multiple inheritance Dart doesn't have (yet)
  7. • production-ready implementation • a lot of existing libraries •

    package system ◦ I'm on it! Dart doesn't have (yet)
  8. #import('dart:html'); var doc = document; main() { doc.query("#header").innerHTML = ...;

    doc.queryAll("button").on.click.add( (event) { ... } ); } Demo