Dart: A Replacement for JavaScript and Why You Should Care

  • 2,561 views
Uploaded on

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

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

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

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,561
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
19
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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

Transcript

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