Dart      A Replacement for    JavaScript and Why You         Should Care                   Kevin W. Gisi Senior Interacti...
What is the Perfect   Language?
Language? (hacker)AccessibleIntuitiveAdaptableFast...enough
Language? (hacker)RubyPythonJavaScriptPHP (just kidding!)
Language?         (academic)Turing completeFormally verifiableFast...no, faster
Language?         (academic)PrologLISPJava / C++ / C#
Language?        (reductive)Minimize miseryGet the right answer
Language?        (reductive)Hackers: happyAcademics: correct
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Language          Fast            JavaWrong              Right          Slow
Language          FastWrong              Right           Java          Slow
JavaStatically typedCompiledCompile-time checkingFast (optimized)
Java DemoPlease find the annotated code at:https://gist.github.com/2410232
Language               Fast        RubyWrong                 Right               Slow
Language           Fast          RubyWrong              Right          Slow
RubyDynamic typingDynamic languageRuntime type-checkingSlow (comparatively)
Ruby DemoPlease find the annotated code at:https://gist.github.com/2410328
Language             FastWrong   JS          Right             Slow
Language               FastWrong   JavaScript    Right              Slow
JavaScriptDynamic typingDynamic languageNot as horrible as it used to be!
JavaScriptNot realAlmost as many () as LISPNo classesIncredibly popular
Dart   http://dartlang.org   Optionally typed   VERY Alpha   Compiles to JavaScript
Language          Fast          DartWrong              Right          Slow
Dart       void main() {         print(Hello, world!);       }
Optional Typing1. Implement runtime type-checking2. Ignore runtime type-checks3. ???4. Profit!
Dart   String toString(int x) {     return x.toString();   }   void main() {     print(toString(5));   }
Dart   toString(x) {     return x.toString();   }   main() {     print(toString(5));   }
Dart   toString(int x) {     return x.toString();   }   toString(double x) {     return x.toString();   }   main() {     p...
Dart String toString(int x) {   return new TotallyNotString(); } main() {   print(toString(5)); }
Optional TypingTypes are annotationsCan’t infer method signaturesCan warn when typing is violatedProvides comment shorthand
Ruby Testing     describe MyUtils do       describe ‘#acceptable_params’ do         a = MyUtils.acceptable_params         ...
Optional Typing
Optional Typing Lies
Dart DemoPlease find the original CoffeeScript code at:    https://github.com/gisikw/jMate  Please find the Dart implementat...
Dart   VERY Alpha   Sound programming   Almost exactly Java   Easy to refactor
Dart (verdict)         Not going to take off         No jQuery support         Too large a transition
Language          FastWrong              Right          Slow
Language          FastWrong              Right          Slow
Lessons for Academics           Optimize for performance           AND for composition           Can move from unstable to...
Lessons for Hackers          Leverage optimization          Consider costs of          dynamism (testing)          Move to...
Language          FastWrong              Right          Slow
Thank you!
Dart: A Replacement for JavaScript and Why You Should Care
Upcoming SlideShare
Loading in …5
×

Dart: A Replacement for JavaScript and Why You Should Care

3,060 views

Published on

A talk by Kevin W. Gisi for the Twin Cities Code Camp 12.

http://hasmanyreasons.com/2012/04/17/dart-why-you-should-care

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,060
On SlideShare
0
From Embeds
0
Number of Embeds
434
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Dart: A Replacement for JavaScript and Why You Should Care

    1. 1. Dart A Replacement for JavaScript and Why You Should Care Kevin W. Gisi Senior Interactive Developer, Roundarch Isobar @gisikw | kevin@kevingisi.comhttp://kevingisi.com | http://hasmanyreasons.com
    2. 2. What is the Perfect Language?
    3. 3. Language? (hacker)AccessibleIntuitiveAdaptableFast...enough
    4. 4. Language? (hacker)RubyPythonJavaScriptPHP (just kidding!)
    5. 5. Language? (academic)Turing completeFormally verifiableFast...no, faster
    6. 6. Language? (academic)PrologLISPJava / C++ / C#
    7. 7. Language? (reductive)Minimize miseryGet the right answer
    8. 8. Language? (reductive)Hackers: happyAcademics: correct
    9. 9. Language FastWrong Right Slow
    10. 10. Language FastWrong Right Slow
    11. 11. Language FastWrong Right Slow
    12. 12. Language FastWrong Right Slow
    13. 13. Language FastWrong Right Slow
    14. 14. Language FastWrong Right Slow
    15. 15. Language FastWrong Right Slow
    16. 16. Language Fast JavaWrong Right Slow
    17. 17. Language FastWrong Right Java Slow
    18. 18. JavaStatically typedCompiledCompile-time checkingFast (optimized)
    19. 19. Java DemoPlease find the annotated code at:https://gist.github.com/2410232
    20. 20. Language Fast RubyWrong Right Slow
    21. 21. Language Fast RubyWrong Right Slow
    22. 22. RubyDynamic typingDynamic languageRuntime type-checkingSlow (comparatively)
    23. 23. Ruby DemoPlease find the annotated code at:https://gist.github.com/2410328
    24. 24. Language FastWrong JS Right Slow
    25. 25. Language FastWrong JavaScript Right Slow
    26. 26. JavaScriptDynamic typingDynamic languageNot as horrible as it used to be!
    27. 27. JavaScriptNot realAlmost as many () as LISPNo classesIncredibly popular
    28. 28. Dart http://dartlang.org Optionally typed VERY Alpha Compiles to JavaScript
    29. 29. Language Fast DartWrong Right Slow
    30. 30. Dart void main() { print(Hello, world!); }
    31. 31. Optional Typing1. Implement runtime type-checking2. Ignore runtime type-checks3. ???4. Profit!
    32. 32. Dart String toString(int x) { return x.toString(); } void main() { print(toString(5)); }
    33. 33. Dart toString(x) { return x.toString(); } main() { print(toString(5)); }
    34. 34. Dart toString(int x) { return x.toString(); } toString(double x) { return x.toString(); } main() { print(toString(5)); }
    35. 35. Dart String toString(int x) { return new TotallyNotString(); } main() { print(toString(5)); }
    36. 36. Optional TypingTypes are annotationsCan’t infer method signaturesCan warn when typing is violatedProvides comment shorthand
    37. 37. Ruby Testing describe MyUtils do describe ‘#acceptable_params’ do a = MyUtils.acceptable_params a.should be_an Array end end
    38. 38. Optional Typing
    39. 39. Optional Typing Lies
    40. 40. Dart DemoPlease find the original CoffeeScript code at: https://github.com/gisikw/jMate Please find the Dart implementation at: https://github.com/gisikw/dartChess
    41. 41. Dart VERY Alpha Sound programming Almost exactly Java Easy to refactor
    42. 42. Dart (verdict) Not going to take off No jQuery support Too large a transition
    43. 43. Language FastWrong Right Slow
    44. 44. Language FastWrong Right Slow
    45. 45. Lessons for Academics Optimize for performance AND for composition Can move from unstable to stable code Pragmatism
    46. 46. Lessons for Hackers Leverage optimization Consider costs of dynamism (testing) Move toward verification
    47. 47. Language FastWrong Right Slow
    48. 48. Thank you!

    ×