Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Immutabilityin Ruby, Python, JavaScript, and Clojure
@teropa
http://www.flickr.com/photos/53952283@N02/4992136318/
Two Realities
Two Realities
Global Mutable State
Non–global Mutable State
Spot The Wormhole
Players
Ruby Python Clojure JavaScript
Primitives
Level 1
42
42 + 42
42 + 42
42 + 42
(+ 42 42)
(Math/abs -42)
Math.abs(-42)
abs(-42)
-42.abs
High Scores
1000 1000 1000 1000
Ruby Python Clojure JavaScript
Strings
Level 2
"Am I immutable?"
"Am I immutable?"
A I m u a l ?m i m t b e
JavaScript
Python
Clojure
Ruby
Ruby
Ruby
High Scores
1500 2000 2000 2000
Ruby Python Clojure JavaScript
Collections
Level 3
Clojure
Ruby
Ruby
ice_nine
Ruby
hamster
Python
JavaScript
JavaScript
mori
Final Scores
2000 2750 3000 2500
Ruby Python Clojure JavaScript
kthx.
@teropa clojurecup.comis.gd/vertxbook
Upcoming SlideShare
Loading in …5
×

Immutability In Ruby, Python, JavaScript, and Clojure

1,824 views

Published on

Slides and video clips from my talk at RuPy 2013

Published in: Technology
  • Be the first to comment

Immutability In Ruby, Python, JavaScript, and Clojure

  1. 1. Immutabilityin Ruby, Python, JavaScript, and Clojure @teropa
  2. 2. http://www.flickr.com/photos/53952283@N02/4992136318/
  3. 3. Two Realities
  4. 4. Two Realities
  5. 5. Global Mutable State
  6. 6. Non–global Mutable State
  7. 7. Spot The Wormhole Players Ruby Python Clojure JavaScript
  8. 8. Primitives Level 1
  9. 9. 42
  10. 10. 42 + 42 42 + 42 42 + 42 (+ 42 42)
  11. 11. (Math/abs -42) Math.abs(-42) abs(-42) -42.abs
  12. 12. High Scores 1000 1000 1000 1000 Ruby Python Clojure JavaScript
  13. 13. Strings Level 2
  14. 14. "Am I immutable?"
  15. 15. "Am I immutable?" A I m u a l ?m i m t b e
  16. 16. JavaScript
  17. 17. Python
  18. 18. Clojure
  19. 19. Ruby
  20. 20. Ruby
  21. 21. Ruby
  22. 22. High Scores 1500 2000 2000 2000 Ruby Python Clojure JavaScript
  23. 23. Collections Level 3
  24. 24. Clojure
  25. 25. Ruby
  26. 26. Ruby ice_nine
  27. 27. Ruby hamster
  28. 28. Python
  29. 29. JavaScript
  30. 30. JavaScript mori
  31. 31. Final Scores 2000 2750 3000 2500 Ruby Python Clojure JavaScript
  32. 32. kthx. @teropa clojurecup.comis.gd/vertxbook

×