SlideShare una empresa de Scribd logo
1 de 214
Stéphane Ducasse
Stéphane Ducasse
stephane.ducasse@inria.fr
http://stephane.ducasse.free.fr/
1
A Little Journey in the
Smalltalk Syntax
S.Ducasse 2
Goal
Lower your stress :)
Show you that this is simple
S.Ducasse 3
Appetizer!
S.Ducasse 4
S.Ducasse 5
Yeah!
Smalltalk is a dynamically typed
language
S.Ducasse 6
ArrayList<String> strings= new ArrayList<String>();
strings := ArrayList new.
S.Ducasse 7
Shorter
Thread regThread = new Thread(new Runnable() {public void run() {this.doSomething();}});regThread.start();
[self doSomething] fork.
S.Ducasse 8
Smalltalk = Objects + Messages + (...)
S.Ducasse 9
Roadmap
Fun with numbers
S.Ducasse 10
1 class
S.Ducasse 11
1 class
>SmallInteger
S.Ducasse 12
1 class maxVal
S.Ducasse 13
1 class maxVal
>1073741823
S.Ducasse 14
1 class maxVal + 1
S.Ducasse 15
1 class maxVal + 1
>1073741824
S.Ducasse 16
(1 class maxVal + 1) class
S.Ducasse 17
(1 class maxVal + 1) class
>LargePositiveInteger
S.Ducasse 18
(1/3) + (2/3)
S.Ducasse 19
(1/3) + (2/3)
>1
S.Ducasse 20
2/3 + 1
S.Ducasse 21
2/3 + 1
> 5/3
S.Ducasse 22
1000 factorial
S.Ducasse 23
1000 factorial
40238726007709377354370243392300398571937486421071463254379991042993851239862902059204420848696
94048004799886101971960586316668729948085589013238296699445909974245040870737599188236277271887
32519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783
64784997701247663288983595573543251318532395846307555740911426241747434934755342864657661166779
73966688202912073791438537195882498081268678383745597317461360853795345242215865932019280908782
97308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426
23613141250878020800026168315102734182797770478463586817016436502415369139828126481021309276124
489635992870511496497541990934222156683257208082133318611681155361583654698404670897560290095053
76164758477284218896796462449451607653534081989013854424879849599533191017233555566021394503997
36280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178
11419454525722386554146106289218796022383897147608850627686296714667469756291123408243920816015
37808898939645182632436716167621791689097799119037540312746222899880051954444142820121873617459
92642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265
17048330422614397428693306169089796848259012545832716822645806652676995865268227280707578139185
81788896522081643483448259932660433676601769996128318607883861502794659551311565520360939881806
12138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470
93519062092902313649327349756551395872055965422874977401141334696271542284586237738753823048386
56889764619273838149001407673104466402598994902222217659043399018860185665264850617997023561938
970178600408118897299183110211712298459016419210688843871218556461249607987229085192968193723886
42614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344
82801505139969429015348307764456909907315243327828826986460278986432113908350621709500259738986
35542771967428222487575867657523442202075736305694988250879689281627538488633969099598262809561
21450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742
17358240106367740459574178516082923013535808184009699637252423056085590370062427124341690900415
36901059339838357779394109700277534720000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
S.Ducasse 24
1000 factorial / 999 factorial
S.Ducasse 25
1000 factorial / 999 factorial
> 1000
S.Ducasse 26
10 @ 100
S.Ducasse 27
10 @ 100
(10 @ 100) x
S.Ducasse 28
10 @ 100
(10 @ 100) x
> 10
S.Ducasse 29
10 @ 100
(10 @ 100) x
> 10
(10 @ 100) y
S.Ducasse 30
10 @ 100
(10 @ 100) x
> 10
(10 @ 100) y
>100
S.Ducasse 31
Points!
Points are created using @
S.Ducasse 32
Puzzle
(10@100) + (20@100)
S.Ducasse 33
Puzzle
(10@100) + (20@100)
>30@200
S.Ducasse 34
Puzzle
(10@100) + (20@100)
>30@200
S.Ducasse 35
Roadmap
Fun with characters, strings, arrays
S.Ducasse 36
$C $h $a $r $a $c $t $e $r
$F, $Q $U $E $N $T $i $N
S.Ducasse 37
space tab?!
Character space
Character tab
Character cr
S.Ducasse 38
‘Strings’
‘Tiramisu’
S.Ducasse 39
Characters
12 printString
> ’12’
S.Ducasse 40
Strings are collections of chars
‘Tiramisu’ at: 1
S.Ducasse 41
Strings are collections of chars
‘Tiramisu’ at: 1
> $T
S.Ducasse 42
A program! -- finding the last char
S.Ducasse 43
A program!
| str |
S.Ducasse 44
A program!
| str | local variable
S.Ducasse 45
A program!
| str | local variable
str := ‘Tiramisu’.
S.Ducasse 46
A program!
| str | local variable
str := ‘Tiramisu’. assignment
S.Ducasse 47
A program!
| str | local variable
str := ‘Tiramisu’. assignment
str at: str length
S.Ducasse 48
A program!
| str | local variable
str := ‘Tiramisu’. assignment
str at: str length message send
> $u
S.Ducasse 49
double ‘ to get one
‘L’’Idiot’
> one string
S.Ducasse 50
For concatenation use ,
‘Calvin’ , ‘ & ‘, ‘Hobbes’
S.Ducasse 51
For concatenation use ,
‘Calvin’ , ‘ & ‘, ‘Hobbes’
> ‘Calvin & Hobbes’
S.Ducasse 52
For concatenation use ,
‘Calvin’ , ‘ & ‘, ‘Hobbes’
> ‘Calvin & Hobbes’
S.Ducasse 53
Symbols: #Pharo
#Something is a symbol
Symbol is a unique string in the system
#Something == #Something
> true
S.Ducasse 54
“Comment”
“what a fun language lecture.
I really liked the desserts”
S.Ducasse 55
#(Array)
#(‘Calvin’ ‘hates’ ‘Suzie’)
S.Ducasse 56
#(Array)
#(‘Calvin’ ‘hates’ ‘Suzie’) size
S.Ducasse 57
#(Array)
#(‘Calvin’ ‘hates’ ‘Suzie’) size
> 3
S.Ducasse 58
First element starts at 1
#(‘Calvin’ ‘hates’ ‘Suzie’) at: 2
S.Ducasse 59
First element starts at 1
#(‘Calvin’ ‘hates’ ‘Suzie’) at: 2
> ‘hates’
S.Ducasse 60
at: to access, at:put: to set
#(‘Calvin’ ‘hates’ ‘Suzie’) at: 2 put: ‘loves’
S.Ducasse 61
#(Array)
#(‘Calvin’ ‘hates’ ‘Suzie’) at: 2 put: ‘loves’
> #(‘Calvin’ ‘loves’ ‘Suzie’)
S.Ducasse 62
Syntax Summary
comment: “a comment”
character: $c $h $a $r $a $c $t $e $r $s $#
$@
string: ‘a nice string’ ‘lulu’ ‘l’’idiot’
symbol: #mac #+
array: #(1 2 3 (1 3) $a 4)
byte array: #[1 2 3]
integer: 1, 2r101
real: 1.5, 6.03e-34,4, 2.4e7
fraction: 1/33
boolean: true, false
point: 10@120
S.Ducasse 63
Roadmap
Fun with keywords-based messages
S.Ducasse 64
Keyword-based messages
arr at:2 put: ‘loves’
S.Ducasse 65
Keyword-based messages
arr at:2 put: ‘loves’
somehow like arr.atput(2,‘loves’)
S.Ducasse 66
From Java to Smalltalk
postman.send(mail,recipient);
S.Ducasse 67
Removing
postman.send(mail,recipient);
S.Ducasse 68
Removing unnecessary
postman send mail recipient
S.Ducasse 69
But without losing information
postman send mail to recipient
S.Ducasse 70
postman send: mail to: recipient
postman.send(mail,recipient);
S.Ducasse 71
postman send: mail to: recipient
The message is send:to:
postman.send(mail,recipient);
S.Ducasse 72
Roadmap
Fun with variables
S.Ducasse 73
Shared or Global starts with Uppercase
Transcript cr .
Transcript show: ‘hello world’.
Transcript cr .
S.Ducasse 74
local or temps starts with lowercase
| str |
str := ‘Tiramisu’
S.Ducasse 75
self, super, true, false, nil
self = this
super
true, false are for Booleans
nil is UndefinedObject instance
S.Ducasse 76
self, super, true, false, nil
self = this in Java
super
true, false are for Booleans
nil is UndefinedObject instance
S.Ducasse 77
Roadmap
Fun with classes
S.Ducasse 78
A class definition!
Superclass subclass: #Class
instanceVariableNames: 'a b c'
...
category: 'Package name'
S.Ducasse 79
A class definition!
Object subclass: #Point
instanceVariableNames: 'x y'
classVariableNames: ''
poolDictionaries: ''
category: 'Graphics-Primitives'
S.Ducasse 80
A class definition!
Object subclass: #Point
instanceVariableNames: 'x y'
classVariableNames: ''
poolDictionaries: ''
category: 'Graphics-Primitives'
S.Ducasse 81
Roadmap
Fun with methods
S.Ducasse 82
On Integer
asComplex
"Answer a Complex number that represents value of
the the receiver."
^ Complex real: self imaginary: 0
S.Ducasse 83
On Boolean
xor: aBoolean
"Exclusive OR. Answer true if the receiver is not
equivalent to aBoolean."
^(self == aBoolean) not
S.Ducasse 84
Summary
self, super
can access instance variables
can define local variable | ... |
Do not need to define argument types
^ to return
S.Ducasse 85
Roadmap
Fun with unary messages
S.Ducasse 86
1 class
S.Ducasse 87
1 class
> SmallInteger
S.Ducasse 88
false not
S.Ducasse 89
false not
> true
S.Ducasse 90
Date today
S.Ducasse 91
Date today
> 24 May 2009
S.Ducasse 92
Time now
S.Ducasse 93
Time now
> 6:50:13 pm
S.Ducasse 94
Float pi
S.Ducasse 95
Float pi
> 3.141592653589793
S.Ducasse 96
We sent messages to objects or
classes!
1 class
Date today
S.Ducasse 97
We sent messages to objects or
classes!
1 class
Date today
S.Ducasse 98
Fun with binary messages
Roadmap
S.Ducasse 99
aReceiver aSelector anArgument
Used for arithmetic, comparison and logical
operations
One or two characters taken from:
+ - /  * ~ < > = @ % | & ! ? ,
S.Ducasse 100
1 + 2
S.Ducasse 101
1 + 2
>3
S.Ducasse 102
2 => 3
S.Ducasse 103
2 => 3
> false
S.Ducasse 104
10 @ 200
S.Ducasse 105
‘Black chocolate’ , ‘ is good’
S.Ducasse 106
Roadmap
Fun with keyword-based messages
S.Ducasse 107
#(‘Calvin’ ‘hates’ ‘Suzie’) at: 2 put:
‘loves’
S.Ducasse 108
#(‘Calvin’ ‘hates’ ‘Suzie’) at: 2 put:
‘loves’
> #(‘Calvin’ ‘loves’ ‘Suzie’)
S.Ducasse 109
10@20 setX: 2
S.Ducasse 110
10@20 setX: 2
> 2@20
S.Ducasse 111
12 between: 10 and: 20
S.Ducasse 112
12 between: 10 and: 20
> true
S.Ducasse 113
receiver
keyword1: argument1
keyword2: argument2
equivalent to
receiver.keyword1keyword2(argument
1, argument2)
S.Ducasse 114
receiver
keyword1: argument1
keyword2: argument2
equivalent to
receiver.keyword1keyword2(argument
1, argument2)
S.Ducasse 115
Browser newOnClass: Point
Roadmap
S.Ducasse 116
Browser newOnClass: Point
S.Ducasse 117
Browser newOnClass: Point
S.Ducasse 118
Yes there is a difference between
doing (side effect)
and returning an object
S.Ducasse 119
Browser newOnClass: Point
> a Browser
S.Ducasse 120
Doing and do not care of the returned
result
Browser newOnClass: Point
S.Ducasse 121
Doing and really want to see the result!
10@20 setX: 2
> 2@20
S.Ducasse 122
Doing vs printing (doing + print result)
S.Ducasse 123
Doing vs printing (doing + print result)
S.Ducasse 124
Roadmap
Messages messages
messages
again messages
....
S.Ducasse 125
Yes there are only messages
unary
binary
keywords
S.Ducasse 126
Composition: from left to right!
69 class inspect
69 class superclass superclass inspect
S.Ducasse 127
Unary> Binary> Keywords
Precedence
S.Ducasse 128
2 + 3 squared
S.Ducasse 129
2 + 3 squared
> 2 + 9
S.Ducasse 130
2 + 3 squared
> 2 + 9
> 11
S.Ducasse 131
Color gray - Color white = Color black
S.Ducasse 132
Color gray - Color white = Color black
> aColor = Color black
S.Ducasse 133
Color gray - Color white = Color black
> aColor = Color black
> true
S.Ducasse 134
2 raisedTo: 3 + 2
S.Ducasse 135
2 raisedTo: 3 + 2
> 2 raisedTo: 5
S.Ducasse 136
2 raisedTo: 3 + 2
> 2 raisedTo: 5
> 32
S.Ducasse 137
1/3 + 2/3
No mathematical precedence
S.Ducasse 138
1/3 + 2/3
>7/3 /3
No mathematical precedence
S.Ducasse 139
Parenthesized takes precedence!
(Msg) > Unary> Binary> Keywords
S.Ducasse 140
(0@0 extent: 100@100) bottomRight
S.Ducasse 141
(0@0 extent: 100@100) bottomRight
> (aPoint extent: anotherPoint)
bottomRight
S.Ducasse 142
(0@0 extent: 100@100) bottomRight
> (aPoint extent: anotherPoint)
bottomRight
> aRectangle bottomRight
S.Ducasse 143
(0@0 extent: 100@100) bottomRight
> (aPoint extent: anotherPoint)
bottomRight
> aRectangle bottomRight
> 100@100
S.Ducasse 144
0@0 extent: 100@100 bottomRight
S.Ducasse 145
0@0 extent: 100@100 bottomRight
> Message not understood
> 100 does not understand
bottomRight
S.Ducasse 146
3 + 2 * 10
No mathematical precedence
S.Ducasse 147
3 + 2 * 10
> 5 * 10
No mathematical precedence
S.Ducasse 148
3 + 2 * 10
> 5 * 10
> 50
argh!
No mathematical precedence
S.Ducasse 149
3 + (2 * 10)
No mathematical precedence
S.Ducasse 150
3 + (2 * 10)
> 3 + 20
No mathematical precedence
S.Ducasse 151
3 + (2 * 10)
> 3 + 20
> 23
No mathematical precedence
S.Ducasse 152
1/3 + 2/3
> 7/3 /3
No mathematical precedence
S.Ducasse 153
1/3 + 2/3
> (7/3) /3
> 7/9
No mathematical precedence
S.Ducasse 154
(1/3) + (2/3)
No mathematical precedence
S.Ducasse 155
(1/3) + (2/3)
> 1
No mathematical precedence
S.Ducasse 156
(Msg) > Unary > Binary > Keywords
from left to right
No mathematical precedence
Only Messages
S.Ducasse 157
(Msg) > Unary > Binary > Keywords
from left to right
No mathematical precedence
Only Messages
S.Ducasse 158
Roadmap
Fun with blocks
S.Ducasse 159
Function definition
fct(x) = x * x + x
S.Ducasse 160
Function Application
fct (2) = 6
fct (20) = 420
S.Ducasse 161
Function definition
fct(x) = x * x + x
|fct|
fct:= [:x | x * x + x].
S.Ducasse 162
Function Application
fct (2) = 6
fct (20) = 420
fct value: 2
> 6
fct value: 20
> 420
S.Ducasse 163
Other examples
[2 + 3 + 4 + 5] value
[:x | x + 3 + 4 + 5 ] value: 2
[:x :y | x + y + 4 + 5] value: 2 value: 3
S.Ducasse 164
Block
anonymous method
[ :variable1 :variable2 |
| tmp |
expression1.
...variable1 ... ]
value: ...
S.Ducasse 165
Block
anonymous method
Really really cool!
Can be passed to methods, stored in instance
variables
[ :variable1 :variable2 |
| tmp |
expression1.
...variable1 ... ]
value: ...
S.Ducasse 166
Roadmap
Fun with conditional
S.Ducasse 167
Example
3 > 0
ifTrue:['positive']
ifFalse:['negative']
S.Ducasse 168
Example
3 > 0
ifTrue:['positive']
ifFalse:['negative']
> ‘positive’
S.Ducasse 169
Yes ifTrue:ifFalse: is a message!
Weather isRaining
ifTrue: [self takeMyUmbrella]
ifFalse: [self takeMySunglasses]
ifTrue:ifFalse is sent to an object: a boolean!
S.Ducasse 170
Booleans
& | not
or: and: (lazy)
xor:
ifTrue:ifFalse:
ifFalse:ifTrue:
...
S.Ducasse 171
Yes! ifTrue:ifFalse: is a message send
to a Boolean.
But optimized by the compiler :)
S.Ducasse 172
10 timesRepeat: [ Transcript show:
'hello'; cr]
S.Ducasse 173
10 timesRepeat: [ Transcript show:
'hello'; cr]
S.Ducasse 174
[x<y] whileTrue: [x := x + 3]
S.Ducasse 175
aBlockTest whileTrue
aBlockTest whileFalse
aBlockTest whileTrue: aBlockBody
aBlockTest whileFalse: aBlockBody
anInteger timesRepeat: aBlockBody
S.Ducasse 176
Confused with () and [] ?
S.Ducasse 177
Only put [ ] when you do not the
number of times something may be
executed
(x isBlue) ifTrue: [ x schroumph ]
10 timesRepeat: [ self shout ]
S.Ducasse 178
Conditions are messages sent to
boolean
(x isBlue) ifTrue: [ ]
S.Ducasse 179
Fun with loops
Roadmap
S.Ducasse 180
1 to: 100 do:
[ :i | Transcript show: i ; space]
S.Ducasse 181
1 to: 100 do:
[ :i | Transcript show: i ; space]
S.Ducasse 182
1 to: 100 by: 3 do:
[ :i | Transcript show: i ; space]
S.Ducasse 183
1 to: 100 by: 3 do:
[ :i | Transcript show: i ; space]
S.Ducasse 184
So yes there are real loops in
Smalltalk!
to:do:
to:by:do:
are just messages send to integers
S.Ducasse 185
So yes there are real loops in
Smalltalk!
to:do:
to:by:do:
are just messages send to integers
S.Ducasse 186
Roadmap
Fun with iterators
S.Ducasse 187
ArrayList<String> strings
= new ArrayList<String>();
for(Person person: persons)
strings.add(person.name());
strings :=
persons collect [:person | person name].
S.Ducasse 188
#(2 -3 4 -35 4) collect: [ :each| each
abs]
S.Ducasse 189
#(2 -3 4 -35 4) collect: [ :each| each
abs]
> #(2 3 4 35 4)
S.Ducasse 190
#(15 10 19 68) collect: [:i | i odd ]
S.Ducasse 191
#(15 10 19 68) collect: [:i | i odd ]
> #(true false true false)
S.Ducasse 192
#(15 10 19 68) collect: [:i | i odd ]
We can also do it that way!
|result|
aCol := #( 2 -3 4 -35 4).
result := aCol species new: aCol size.
1 to: aCollection size do:
[ :each | result at: each put: (aCol at: each) odd].
result
S.Ducasse 193
#(15 10 19 68) do:
[:i | Transcript show: i ; cr ]
S.Ducasse 194
#(15 10 19 68) do:
[:i | Transcript show: i ; cr ]
S.Ducasse 195
#(1 2 3)
with: #(10 20 30)
do: [:x :y| Transcript show: (y ** x) ;
cr ]
S.Ducasse 196
#(1 2 3)
with: #(10 20 30)
do: [:x :y| Transcript show: (y ** x) ;
cr ]
S.Ducasse 197
How do: is implemented?
S.Ducasse 198
How do: is implemented?
SequenceableCollection>>do: aBlock
"Evaluate aBlock with each of the receiver's elements as
the argument."
1 to: self size do: [:i | aBlock value: (self at: i)]
S.Ducasse 199
Some others... friends
#(15 10 19 68) select: [:i|i odd]
#(15 10 19 68) reject: [:i|i odd]
#(12 10 19 68 21) detect: [:i|i odd]
#(12 10 12 68) detect: [:i|i odd] ifNone:[1]
S.Ducasse 200
Some others... friends
#(15 10 19 68) select: [:i|i odd]
> #(15 19)
#(15 10 19 68) reject: [:i|i odd]
#(12 10 19 68 21) detect: [:i|i odd]
#(12 10 12 68) detect: [:i|i odd] ifNone:[1]
S.Ducasse 201
Some others... friends
#(15 10 19 68) select: [:i|i odd]
> #(15 19)
#(15 10 19 68) reject: [:i|i odd]
> #(10 68)
#(12 10 19 68 21) detect: [:i|i odd]
#(12 10 12 68) detect: [:i|i odd] ifNone:[1]
S.Ducasse 202
Some others... friends
#(15 10 19 68) select: [:i|i odd]
> #(15 19)
#(15 10 19 68) reject: [:i|i odd]
> #(10 68)
#(12 10 19 68 21) detect: [:i|i odd]
> 19
#(12 10 12 68) detect: [:i|i odd] ifNone:[1]
S.Ducasse 203
Some others... friends
#(15 10 19 68) select: [:i|i odd]
> #(15 19)
#(15 10 19 68) reject: [:i|i odd]
> #(10 68)
#(12 10 19 68 21) detect: [:i|i odd]
> 19
#(12 10 12 68) detect: [:i|i odd] ifNone:[1]
> 1
S.Ducasse 204
Iterators are your best friends
compact
nice abstraction
Just messages sent to collections
S.Ducasse 205
Iterators are your best friends
compact
nice abstraction
Just messages sent to collections
S.Ducasse 206
A simple exercise
How do you define the method that does that?
#() -> ‘’
#(a) ->’a’
#(a b c) -> ‘a, b, c’
S.Ducasse 207
#(a b c)
do: [:each | Transcript show: each
printString]
separatedBy: [Transcript show: ‘,’]
S.Ducasse 208
#(a b c)
do: [:each | Transcript show: each
printString]
separatedBy: [Transcript show: ‘,’]
S.Ducasse 209
S.Ducasse 210
Messages Sequence
• message1 .
• message2 .
• message3
• . is a separator, not a terminator
•
• | macNode pcNode node1 printerNode |
• macNode := Workstation withName: #mac.
• Transcript cr.
• Transcript show: 1 printString.
• Transcript cr.
• Transcript show: 2 printString
S.Ducasse 211
Multiple messages to an objects ;
To send multiple messages to the same object
Transcript show: 1 printString.
Transcript cr
is equivalent to:
Transcript show: 1 printString ;
cr
S.Ducasse 212
Hints ...
x isNil ifTrue: [...]
x includes: 3 ifTrue: [...]
is read as the message includes:ifTrue:
(x includes: 3) ifTrue: [...]
S.Ducasse 213
S.Ducasse 214
Smalltalk is fun
Pure simple powerful
www.seaside.st
(www.dabbledb.com)
www.pharo-project.org

Más contenido relacionado

La actualidad más candente (20)

Stoop ed-some principles
Stoop ed-some principlesStoop ed-some principles
Stoop ed-some principles
 
9 - OOP - Smalltalk Classes (c)
9 - OOP - Smalltalk Classes (c)9 - OOP - Smalltalk Classes (c)
9 - OOP - Smalltalk Classes (c)
 
5 - OOP - Smalltalk in a Nutshell (a)
5 - OOP - Smalltalk in a Nutshell (a)5 - OOP - Smalltalk in a Nutshell (a)
5 - OOP - Smalltalk in a Nutshell (a)
 
5 - OOP - Smalltalk in a Nutshell (c)
5 - OOP - Smalltalk in a Nutshell (c)5 - OOP - Smalltalk in a Nutshell (c)
5 - OOP - Smalltalk in a Nutshell (c)
 
5 - OOP - Smalltalk in a Nutshell (b)
5 - OOP - Smalltalk in a Nutshell (b)5 - OOP - Smalltalk in a Nutshell (b)
5 - OOP - Smalltalk in a Nutshell (b)
 
02 basics
02 basics02 basics
02 basics
 
Pharo - I have a dream @ Smalltalks Conference 2009
Pharo -  I have a dream @ Smalltalks Conference 2009Pharo -  I have a dream @ Smalltalks Conference 2009
Pharo - I have a dream @ Smalltalks Conference 2009
 
04 idioms
04 idioms04 idioms
04 idioms
 
07 bestpractice
07 bestpractice07 bestpractice
07 bestpractice
 
12 virtualmachine
12 virtualmachine12 virtualmachine
12 virtualmachine
 
8 - OOP - Syntax & Messages
8 - OOP - Syntax & Messages8 - OOP - Syntax & Messages
8 - OOP - Syntax & Messages
 
11 bytecode
11 bytecode11 bytecode
11 bytecode
 
03 standardclasses
03 standardclasses03 standardclasses
03 standardclasses
 
10 - OOP - Inheritance (a)
10 - OOP - Inheritance (a)10 - OOP - Inheritance (a)
10 - OOP - Inheritance (a)
 
2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut2013 lecture-02-syntax shortnewcut
2013 lecture-02-syntax shortnewcut
 
08 refactoring
08 refactoring08 refactoring
08 refactoring
 
Swift Programming - Part 2
Swift Programming - Part 2Swift Programming - Part 2
Swift Programming - Part 2
 
4 - OOP - Taste of Smalltalk (VisualWorks)
4 - OOP - Taste of Smalltalk (VisualWorks)4 - OOP - Taste of Smalltalk (VisualWorks)
4 - OOP - Taste of Smalltalk (VisualWorks)
 
Symfony2 and Doctrine2 Integration
Symfony2 and Doctrine2 IntegrationSymfony2 and Doctrine2 Integration
Symfony2 and Doctrine2 Integration
 
Stop that!
Stop that!Stop that!
Stop that!
 

Similar a 8 - OOP - Smalltalk Syntax

Similar a 8 - OOP - Smalltalk Syntax (13)

10 - OOP - Inheritance (b)
10 - OOP - Inheritance (b)10 - OOP - Inheritance (b)
10 - OOP - Inheritance (b)
 
Kotlin: maybe it's the right time
Kotlin: maybe it's the right timeKotlin: maybe it's the right time
Kotlin: maybe it's the right time
 
Perl object ?
Perl object ?Perl object ?
Perl object ?
 
Learn python in 20 minutes
Learn python in 20 minutesLearn python in 20 minutes
Learn python in 20 minutes
 
Codeware
CodewareCodeware
Codeware
 
11 - OOP - Numbers
11 - OOP - Numbers11 - OOP - Numbers
11 - OOP - Numbers
 
SAT/SMT solving in Haskell
SAT/SMT solving in HaskellSAT/SMT solving in Haskell
SAT/SMT solving in Haskell
 
Fog City Ruby - Triple Equals Black Magic with speaker notes
Fog City Ruby - Triple Equals Black Magic with speaker notesFog City Ruby - Triple Equals Black Magic with speaker notes
Fog City Ruby - Triple Equals Black Magic with speaker notes
 
06 debugging
06 debugging06 debugging
06 debugging
 
Stoop 422-naming idioms
Stoop 422-naming idiomsStoop 422-naming idioms
Stoop 422-naming idioms
 
Stoop ed-unit ofreuse
Stoop ed-unit ofreuseStoop ed-unit ofreuse
Stoop ed-unit ofreuse
 
Redis, Resque & Friends
Redis, Resque & FriendsRedis, Resque & Friends
Redis, Resque & Friends
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 

Más de The World of Smalltalk (18)

05 seaside canvas
05 seaside canvas05 seaside canvas
05 seaside canvas
 
99 questions
99 questions99 questions
99 questions
 
13 traits
13 traits13 traits
13 traits
 
10 reflection
10 reflection10 reflection
10 reflection
 
09 metaclasses
09 metaclasses09 metaclasses
09 metaclasses
 
05 seaside
05 seaside05 seaside
05 seaside
 
01 intro
01 intro01 intro
01 intro
 
Stoop sed-smells
Stoop sed-smellsStoop sed-smells
Stoop sed-smells
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop metaclasses
Stoop metaclassesStoop metaclasses
Stoop metaclasses
 
Stoop ed-subtyping subclassing
Stoop ed-subtyping subclassingStoop ed-subtyping subclassing
Stoop ed-subtyping subclassing
 
Stoop ed-lod
Stoop ed-lodStoop ed-lod
Stoop ed-lod
 
Stoop ed-inheritance composition
Stoop ed-inheritance compositionStoop ed-inheritance composition
Stoop ed-inheritance composition
 
Stoop ed-frameworks
Stoop ed-frameworksStoop ed-frameworks
Stoop ed-frameworks
 
Stoop ed-dual interface
Stoop ed-dual interfaceStoop ed-dual interface
Stoop ed-dual interface
 
Stoop 450-s unit
Stoop 450-s unitStoop 450-s unit
Stoop 450-s unit
 
Stoop 440-adaptor
Stoop 440-adaptorStoop 440-adaptor
Stoop 440-adaptor
 

Último

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Último (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

8 - OOP - Smalltalk Syntax