Smalltalk

1,827 views

Published on

Presents Smalltalk and try to convince people that it's not dead

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

No Downloads
Views
Total views
1,827
On SlideShare
0
From Embeds
0
Number of Embeds
165
Actions
Shares
0
Downloads
35
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Smalltalk

  1. 1. Smalltalk Damien Cassou
  2. 2. ☠ ?
  3. 3. New tools
  4. 4. New books
  5. 5. New interests
  6. 6. Used?
  7. 7. 20%
  8. 8. 1,600 simultaneous users
  9. 9. 5,000 bookings/day
  10. 10. 10,000 updates/day
  11. 11. 1.9 billion objects
  12. 12. guess what?
  13. 13. everything in Smalltalk
  14. 14. Portable?
  15. 15. SqueakNOS
  16. 16. 2147483647 + 1 = -2147483648
  17. 17. 2147483647 + 1 = -2147483648 Java
  18. 18. 2147483647 + 1 = 2147483648 Smalltalk
  19. 19. 100 factorial =
  20. 20. 100 factorial = 9332621544394415268169923885626670 0490715968264381621468592963895217 5999932299156089414639761565182862 5369792082722375825118521091686400 0000000000000000000000
  21. 21. Concepts
  22. 22. Object oriented
  23. 23. Everything is an object
  24. 24. methods numbers Everything is classes an object tools method calls call stack
  25. 25. Method calls
  26. 26. postman.send(mail,recipient);
  27. 27. postman.send(mail,recipient);
  28. 28. postman.send(mail,recipient;
  29. 29. postman.send(mail to,recipient.
  30. 30. postman.send(mail,recipient); postman send: mail to: recipient.
  31. 31. Unary methods
  32. 32. 'Smalltalk' size String size
  33. 33. Binary methods
  34. 34. 1+2 Number + aNumber
  35. 35. Dynamically typed
  36. 36. ArrayList<String> strings = new ArrayList<String>(); strings := ArrayList new.
  37. 37. Closures
  38. 38. ArrayList<String> strings = new ArrayList<String>(); for(Person person: persons) strings.add(person.name()); strings := persons collect: [:person | person name]. Collection collect: aBlock
  39. 39. Thread regThread = new Thread( new Runnable() { public void run() { this.doSomething(); } }); regThread.start(); Block [self doSomething] fork. fork
  40. 40. Garbage collector
  41. 41. <= aPoint ^ x <= (aPoint x) and: [y <= (aPoint y)] Point x y (2@3) <= (5@6) <= aPoint Number @ aNumber
  42. 42. Constructors
  43. 43. Control structures
  44. 44. max: aNumber (self < aNumber) ifTrue: [^ aNumber] ifFalse: [^ self] Number max: aNumber ifTrue: t ifFalse: f ^ t value ifTrue: t ifFalse: f ^ f value
  45. 45. pharo-project.org

×