Smalltalk

       Damien Cassou
☠   ?
New tools
New books
New interests
Used?
20%
1,600
simultaneous users
5,000
bookings/day
10,000
updates/day
1.9 billion
   objects
guess what?
everything in


Smalltalk
Portable?
SqueakNOS
2147483647 + 1
      =
 -2147483648
2147483647 + 1
      =
 -2147483648
  Java
2147483647 + 1
      =
  2147483648
Smalltalk
100 factorial
     =
100 factorial
                 =
9332621544394415268169923885626670
0490715968264381621468592963895217
5999932299156089414...
Concepts
Object
oriented
Everything is
  an object
methods          numbers

Everything is
      classes
    an object
tools
             method calls
call stack
Method calls
postman.send(mail,recipient);
postman.send(mail,recipient);
postman.send(mail,recipient;
postman.send(mail to,recipient.
postman.send(mail,recipient);



postman send: mail to: recipient.
Unary
methods
'Smalltalk' size
                   String
            size
Binary
methods
1+2
         Number
      + aNumber
Dynamically
  typed
ArrayList<String> strings
     = new ArrayList<String>();



strings := ArrayList new.
Closures
ArrayList<String> strings
         = new ArrayList<String>();
for(Person person: persons)
  strings.add(person.name());

s...
Thread regThread = new Thread(
new Runnable() {
 public void run() {
   this.doSomething();
 }
});
regThread.start();
    ...
Garbage
collector
<= aPoint
 ^ x <= (aPoint x)
       and: [y <= (aPoint y)]
                              Point
                         x
...
Constructors
Control
structures
max: aNumber
  (self < aNumber)
      ifTrue: [^ aNumber]
      ifFalse: [^ self]
           Number
        max: aNumber

...
pharo-project.org
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Smalltalk
Upcoming SlideShare
Loading in...5
×

Smalltalk

1,486

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,486
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
33
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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×