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

Dart: Preview

Avatar for Ladislav Thon Ladislav Thon
December 13, 2011
98

Dart:Β Preview

Avatar for Ladislav Thon

Ladislav Thon

December 13, 2011

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