%!PS-Adobe-2.0
%%Creator: dvips 5.47 Copyright 1986-91 Radical Eye Software
%%Title: xoop.dvi
%%Pages: 5 1
%%BoundingBox: 0 0 596 843
%%DocumentFonts: Palatino-Bold Palatino-Roman Palatino-Italic
%%EndComments
%%BeginProcSet: tex.pro
/TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch
load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{
isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
Resolution VResolution vsize neg mul TR matrix currentmatrix dup dup 4 get
round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@letter{/vsize 10
N}B /@landscape{/isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@a3{
/vsize 15.5531 N}B /@ledger{/vsize 16 N}B /@legal{/vsize 13 N}B /@manualfeed{
statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N
/FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn begin
/FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array
/BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2
array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail}
B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{pop nn dup definefont
setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup
length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{
ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B
/ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0
N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S
dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0
ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice
ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ch-image}
imagemask restore}B /D{/cc X dup type /stringtype ne{]}if nn /base get cc ctr
put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf
div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B /bop{userdict /bop-hook
known{bop-hook}if /SI save N @rigin 0 0 moveto}N /eop{clear SI restore
showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook
known{start-hook}if /VResolution X /Resolution X 1000 div /DVImag X /IE 256
array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}N /p /show load N
/RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X
/rulex X V}B /V statusdict begin /product where{pop product dup length 7 ge{0
7 getinterval(Display)eq}{pop false}ifelse}{false}ifelse end{{gsave TR -.1 -.1
TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1
-.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /a{
moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{
S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B
/j{3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w
}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p
a}B /bos{/SS save N}B /eos{clear SS restore}B end
%%EndProcSet
%%BeginProcSet: texps.pro
TeXDict begin /rf{655360 div mul Resolution mul 7227 div /PixPerEm X findfont
dup length 1 add dict /nn X{1 index /FID ne{nn 3 1 roll put}{pop pop}ifelse}
forall 256 dict begin nn /Encoding get 0 1 255{2 copy get 3 index 2 index get
1000 mul PixPerEm div def pop}for pop pop nn /Metrics currentdict put end
/fontname X /nn dup nn definefont[PixPerEm 0 0 PixPerEm neg 0 0]makefont N
fontname{/foo setfont}2 array copy cvx N fontname load 0 nn put}N
/ObliqueSlant{dup sin S cos div neg}B /SlantFont{/foo X[1 0 foo 1 0 0]
TransFont}N /ExtendFont{/foo X 3 2 roll[S{foo div}forall]3 1 roll[foo 0 0 1 0
0]TransFont}N /TransFont{S findfont S makefont dup length dict /nn X{1 index
/FID ne{nn 3 1 roll put}{pop pop}ifelse}forall dup nn definefont pop}N end
%%EndProcSet
TeXDict begin 1000 300 300 @start /Fa [ 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 12 19 23 19 33
29 10 12 12 15 23 9 12 9 11 19 19 19 19 19 19 19 19 19 19 9
9 23 23 23 19 28 27 23 25 29 23 21 27 29 12 12 25 21 35 29
29 23 29 25 21 23 29 27 35 27 25 25 12 23 12 23 19 10 17 17
15 19 15 10 19 19 10 10 17 10 29 21 17 19 17 15 15 12 21 19
27 19 19 17 12 23 12 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 19 19 6 25 19 19 23 12 19
19 12 12 20 20 0 19 19 19 9 0 19 19 10 19 19 19 37 37 0 19
0 12 12 12 12 12 12 12 12 0 12 12 0 12 12 12 37 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 35 0 12 0 0 0 0 21 29 38 12 0 0 0 0 0 24
0 0 0 10 0 0 10 17 25 19 0 0 0 0 ] /Palatino-Italic 1000 589824
rf /Fb [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 9 10 14 23 19 31 29 10 12 12 15 23 9 12 9 23
19 19 19 19 19 19 19 19 19 19 9 9 23 23 23 17 28 29 23 26 29
23 21 29 31 13 12 27 23 35 31 29 23 29 25 20 23 29 27 37 25
25 25 12 23 12 23 19 10 19 21 17 23 18 12 21 22 11 9 21 11
33 22 20 22 21 15 16 12 23 21 31 19 21 19 12 23 12 23 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 10 19 19 6 19 19 19 23 8 19 19 12 12 23 23 0 19 19 19 9 0
23 23 10 19 19 19 37 43 0 17 0 12 12 12 12 12 12 9 12 0 12
12 0 14 12 12 37 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 35 0 12 0
0 0 0 23 31 37 12 0 0 0 0 0 28 0 0 0 11 0 0 11 21 31 21 0 0
0 0 ] /Palatino-Roman 1000 589824 rf /Fc 3 52 df<0C003C00CC000C000C000C000C00
0C000C000C000C000C000C000C000C00FF8009107E8F0F>49 D<1F00618040C08060C060006000
6000C00180030006000C00102020207FC0FFC00B107F8F0F>I<1F00218060C060C000C0008001
800F00008000400060C060C060804060801F000B107F8F0F>I E /Fd 3
52 df<0C001C00EC000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C00
FFC00A137D9211>49 D<1F0060C06060F070F030603000700070006000C001C001800200040008
10101020207FE0FFE00C137E9211>I<0FC030707038703870380038003000E00FC00070003800
18001C601CF01CF018E03860701FC00E137F9211>I E /Fe [ 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11
15 23 28 23 40 35 13 15 15 18 28 11 15 11 13 23 23 23 23 23
23 23 23 23 23 11 11 28 28 28 23 34 33 28 30 35 28 25 33 35
15 15 30 25 43 35 35 28 35 30 25 28 35 33 43 33 30 30 15 28
15 28 23 13 20 21 18 23 18 13 23 23 13 13 20 13 35 25 20 23
21 18 18 15 25 23 33 23 23 20 15 28 15 28 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 23 23
8 30 23 23 28 15 23 23 15 15 24 25 0 23 23 23 11 0 23 23 13
23 23 23 45 45 0 23 0 15 15 15 15 15 15 15 15 0 15 15 0 15
15 15 45 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 43 0 15 0 0 0 0 25
35 47 15 0 0 0 0 0 29 0 0 0 13 0 0 13 20 30 23 0 0 0 0 ] /Palatino-Italic
1000 717619 rf /Ff [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 11 13 17 28 23 38 35 13 15 15 18
28 11 15 11 28 23 23 23 23 23 23 23 23 23 23 11 11 28 28 28
20 34 35 28 32 35 28 25 35 38 15 15 33 28 43 38 36 27 36 30
24 28 35 33 45 30 30 30 15 28 15 28 23 13 23 25 20 28 22 15
25 26 13 11 25 13 40 26 25 27 25 18 19 15 27 26 38 23 25 23
15 28 15 28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 13 23 23 8 23 23 23 28 9 23 23 15 15 27
28 0 23 23 23 11 0 29 28 13 23 23 23 45 52 0 20 0 15 15 15
15 15 15 11 15 0 15 15 0 17 14 15 45 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 43 0 15 0 0 0 0 28 38 45 15 0 0 0 0 0 34 0 0 0 13
0 0 13 25 38 25 0 0 0 0 ] /Palatino-Roman 1000 717619 rf /Fg
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 15 17 24 36 30 53 50 17 20 20 27 36 15 20 15 18 30 30
30 30 30 30 30 30 30 30 15 15 36 36 36 27 45 47 40 43 50 37
33 50 50 23 23 47 37 60 50 50 37 50 43 37 40 47 47 60 40 40
40 20 36 20 36 30 17 30 37 27 37 30 23 33 37 20 20 37 20 53
37 33 37 37 23 27 20 37 33 50 30 33 30 19 36 19 36 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 30 30 10 30 30 30 36 14 30 30 23 23 37 37 0 30 30 30 15
0 38 36 20 30 30 30 60 60 0 27 0 20 20 20 20 20 20 20 20 0
20 20 0 20 20 20 60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 60 0 26
0 0 0 0 37 50 60 29 0 0 0 0 0 47 0 0 0 20 0 0 20 33 50 37 0
0 0 0 ] /Palatino-Bold 1000 943718 rf /Fh [ 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 14 21 25
21 37 32 12 14 14 16 25 10 14 10 12 21 21 21 21 21 21 21 21
21 21 10 10 25 25 25 21 31 30 25 28 32 25 23 30 32 14 14 28
23 39 32 32 25 32 28 23 25 32 30 39 30 28 28 14 25 14 25 21
12 18 19 17 21 16 12 21 21 12 12 18 12 32 23 18 21 19 16 16
14 23 21 30 21 21 18 14 25 14 25 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 21 21 7 28 21
21 25 14 21 21 14 14 22 23 0 21 21 21 10 0 21 21 12 21 21 21
42 42 0 21 0 14 14 14 14 14 14 14 14 0 14 14 0 14 14 14 42
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 39 0 14 0 0 0 0 23 32 43 14
0 0 0 0 0 26 0 0 0 12 0 0 12 18 28 21 0 0 0 0 ] /Palatino-Italic
1000 655360 rf /Fi [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 10 12 17 25 21 37 35 12 14 14 18
25 10 14 10 12 21 21 21 21 21 21 21 21 21 21 10 10 25 25 25
18 31 32 28 30 35 25 23 35 35 16 16 32 25 42 35 35 25 35 30
25 28 32 32 42 28 28 28 14 25 14 25 21 12 21 25 18 25 21 16
23 25 14 14 25 14 37 25 23 25 25 16 18 14 25 23 35 21 23 21
13 25 13 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 12 21 21 7 21 21 21 25 9 21 21 16 16 25
25 0 21 21 21 10 0 27 25 14 21 21 21 42 42 0 18 0 14 14 14
14 14 14 14 14 0 14 14 0 14 14 14 42 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 42 0 18 0 0 0 0 25 35 42 20 0 0 0 0 0 32 0 0 0 14
0 0 14 23 35 25 0 0 0 0 ] /Palatino-Bold 1000 655360 rf /Fj
[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 10 12 15 25 21 35 32 12 14 14 16 25 10 14 10 25 21 21
21 21 21 21 21 21 21 21 10 10 25 25 25 18 31 32 25 29 32 25
23 32 35 14 14 30 25 39 34 33 25 33 28 22 25 32 30 42 28 28
28 14 25 14 25 21 12 21 23 18 25 20 14 23 24 12 10 23 12 37
24 23 25 23 16 18 14 25 23 35 21 23 21 14 25 14 25 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 21 21 7 21 21 21 25 9 21 21 14 14 25 25 0 21 21 21 10 0
26 25 12 21 21 21 42 47 0 18 0 14 14 14 14 14 14 10 14 0 14
14 0 16 13 14 42 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 39 0 14 0
0 0 0 25 35 41 14 0 0 0 0 0 31 0 0 0 12 0 0 12 23 34 23 0 0
0 0 ] /Palatino-Roman 1000 655360 rf /Fk [ 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 14 18 30
25 42 39 14 17 17 19 30 12 17 12 30 25 25 25 25 25 25 25 25
25 25 12 12 30 30 30 22 37 39 30 35 39 30 28 38 41 17 17 36
30 47 41 39 30 39 33 26 31 39 36 50 33 33 33 17 30 17 30 25
14 25 28 22 30 24 17 28 29 14 12 28 14 44 29 27 30 28 20 21
16 30 28 42 26 28 25 17 30 17 30 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 25 25 8 25 25
25 30 10 25 25 16 16 30 30 0 25 25 25 12 0 31 30 14 25 25 25
50 57 0 22 0 17 17 17 17 17 17 12 17 0 17 17 0 19 16 17 50
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 47 0 17 0 0 0 0 30 41 50 17
0 0 0 0 0 38 0 0 0 14 0 0 14 28 41 28 0 0 0 0 ] /Palatino-Roman
1000 786432 rf /Fl [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 18 20 29 43 36 64 60 20 24 24 32
43 18 24 18 21 36 36 36 36 36 36 36 36 36 36 18 18 43 43 43
32 54 56 48 52 60 44 40 60 60 28 28 56 44 72 60 60 44 60 52
44 48 56 56 72 48 48 48 24 43 24 43 36 20 36 44 32 44 36 28
40 44 24 24 44 24 64 44 40 44 44 28 32 24 44 40 60 36 40 36
22 43 22 43 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 20 36 36 12 36 36 36 43 16 36 36 28 28
44 44 0 36 36 36 18 0 46 43 24 36 36 36 72 72 0 32 0 24 24
24 24 24 24 24 24 0 24 24 0 24 24 24 72 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 72 0 31 0 0 0 0 44 60 72 35 0 0 0 0 0 56 0 0 0
24 0 0 24 40 60 44 0 0 0 0 ] /Palatino-Bold 1000 1132462 rf
end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 300
TeXDict begin @a4
%%EndSetup
%%Page: 1 1
bop 50 469 a Fl(Inheritance)16 b(vs.)26 b(delegation:)e(Is)18
b(one)f(better)h(than)f(the)h(other?)828 622 y Fk(Peter)12
b(Bosch)763 680 y Fj(University)f(of)f(T)l(wente)851 738 y
Fk(Enschede)771 796 y(The)i(Netherlands)665 854 y(Peter)l
(
[email protected])817 958 y(April)g(6,)h(1993)877 1188
y Fi(Abstract)213 1271 y Fj(In)c(this)e(paper)h(I)g(will)g(discuss)g(the)g
(dif)o(fer)o(ences)h(between)e(inheritance)h(based)g(systems)e(and)i(del-)151
1321 y(egation)g(based)h(systems.)k(Speci\256cally)-5 b(,)11
b(I)e(would)g(like)g(to)f(discuss)h(the)g(way)g(objects)f(ar)o(e)h(or)o
(ganized)151 1370 y(in)h(both)f(systems,)f(the)i(way)f(inheritance)h(is)f
(implemented,)h(how)f(the)g Fh(self)g Fj(variable)h(is)g(tr)o(eated)f(and)151
1420 y(I)i(would)f(like)g(to)g(discuss)g(the)g(advantages)f(and)i
(disadvantages)f(of)g(both)f(language)i(types.)37 1647 y Fg(1)60
b(Introduction)37 1753 y Ff(Inheritance)22 b(based)e(systems)h(split)g(the)f
(objects)g(up)h(into)g Fe(classes)p Ff(.)42 b(Classes)21 b(describe)g(the)f
(shar)o(ed)37 1809 y(behaviour)15 b(of)f(a)f(set)h(of)g(objects.)24
b(A)15 b(new)f(object)f(is)h(instantiated)h(fr)o(om)f(the)g(class)g(and)g
(has)h(no)f(corr)o(e-)37 1865 y(spondance)g(to)e(other)g(objects)g(of)g(the)h
(same)f(class)h(except)g(for)f(the)h(class)g(object.)19 b(If)13
b(some)f(class)h(shar)o(es)37 1922 y(behaviour)g(with)g(another)f(class)h
(but)g(has)g(some)f(peculiarities,)j(a)d Fe(subclass)g Ff(is)h(cr)o(eated)e
(which)j(inherits)37 1978 y(the)f(shar)o(ed)g(behaviour)g(fr)o(om)g(the)f
Fe(super)o(class)p Ff(.)20 b(An)13 b(object)f(in)i(a)e(pr)o(ototype)h(based)f
(system)h(r)o(epr)o(esents)37 2035 y(the)h Fe(default)e Ff(behaviour)i(of)f
(an)g(object.)22 b(If)13 b(a)g(new)g(object)g(has)g(a)g(dif)o(fer)o(ent)h
(behaviour)m(,)g(a)f(new)g(object)f(is)37 2091 y(cr)o(eated)f(which)i
(describes)e(its)h(dif)o(fer)o(ences)g(fr)o(om)g(the)f Fe(pr)o(ototype)g
Ff(object)g([3].)108 2148 y(In)20 b(this)f(paper)g(I)g(would)g(like)h(to)e
(take)h(a)f(closer)h(look)g(at)g(the)f(dif)o(fer)o(ences)i(between)f(class)g
(and)37 2204 y(pr)o(ototype)11 b(based)f(systems.)18 b(Speci\256cally)-5
b(,)12 b(after)e(r)o(eading)h([5])g(and)f([3])h(it)f(seems)h(that)g(pr)o
(ototype)f(based)37 2261 y(system)i(ar)o(e)f(a)g(superset)h(of)g(class)g
(based)f(systems.)108 2317 y(This)i(paper)f(is)g(or)o(ganized)g(as)g
(follows.)19 b(Chapter)13 b(2)e(will)i(describe)f(class)h(based)e(systems,)j
(chapter)37 2374 y(3)e(will)h(describe)f(pr)o(ototype)g(based)g(system,)h
(and)f(chapter)g(4)g(will)g(describe)g(the)h(dif)o(fer)o(ences)f(between)37
2430 y(both)g(systems.)18 b(Conclusions)13 b(can)f(be)f(found)h(in)g(chapter)
g(5.)37 2634 y Fg(2)60 b(Class)14 b(Based)g(Systems)37 2740
y Ff(In)k(a)e(class)h(based)f(system,)i(two)e(object)g(types)h(exist:)27
b(class)17 b(objects)f(which)i(describe)e(the)g(common)37 2796
y(behaviour)d(of)f(objects)g(and)h(instance)g(objects)f(which)i(hold)e(the)h
(instance)g(variables)f(for)h(an)f(object)g([3])945 2921 y(1)p
eop
%%Page: 2 2
bop 37 183 a Fd(1)56 199 y Ff(.)30 b(The)15 b(class)i(objects)e(contain)h
(methods)g(to)f Fe(instantiate)h Ff(an)f(instance)i(object.)29
b(T)l(o)15 b(construct)h(a)f(class)37 256 y(object,)f(the)f(common)h
(behaviour)g(of)f(a)g(set)g(of)g(objects)g(is)h(identi\256ed)g(and)f(stor)o
(ed)g(in)h(the)f(class)h(object.)37 312 y(The)i(idiosyncracies)h(of)e(the)h
(objects,)g(however)m(,)g(ar)o(e)g(stor)o(ed)f(in)h(the)f(instances)i(of)f
(an)f(object.)29 b(If,)17 b(for)37 369 y(example,)12 b(you)f(ar)o(e)f
(building)j(a)d(class)i(based,)e(object)g(oriented,)h(windowing)h(system,)g
(you)f(would)f(put)37 425 y(the)h(common)g(behaviour)g(of)f(windows)h(in)h
(the)e(class)h Fe(windows)f Ff(\(such)i(as)f(the)f(fact)h(that)f(every)g
(window)37 482 y(has)17 b(a)e(position)i(on)f(the)g(scr)o(een\),)i(while)e
(the)g(idiosyncracies)h(of)f(a)f(speci\256c)j(window)e(ar)o(e)f(put)h(in)h
(an)37 538 y(instance)c(object)d(\(such)j(as)f(the)f(curr)o(ent)h(location)g
(of)f(the)h(window)f(on)h(a)f(scr)o(een\).)108 598 y(If)16
b(an)f(object)g(wants)g(to)g(shar)o(e)g(behaviour)h(with)f(a)g(class,)i(but)f
(the)f(object)g(itself)g(has)h(some)f(pecu-)37 655 y(liarities,)g(the)d
(added)g(behaviour)h(can)g(be)g(captur)o(ed)g(in)h(a)e(subclass.)23
b(The)13 b(common)g(functions)i(can)e(be)37 711 y(accessed)f(thr)o(ough)i
Fe(inheritance)d Ff([4].)19 b(The)12 b(subclass)i(can)e(specify)h(which)g
(common)g(behavior)f(it)g(wants)37 768 y(to)f(use)h(of)g(the)f(super)o(class)
i(and)e(which)i(behaviour)e(it)h(doesn't)f(want)g(to)g(use.)108
828 y(Several)k(techniques)i(exist)f(to)g(invoke)f(an)h(operation)g(on)g(an)g
(object.)28 b(For)16 b(example,)i(in)e Fe(C++)f Ff([1])37 884
y(an)f(operation)g(on)f(an)h(object)f(is)h(performed)f(by)h(executing)h(one)f
(of)f(the)h(methods)f(of)h(the)f(object.)23 b(The)37 941 y(methods)12
b(can)h(be)f(found)g(thr)o(ough)h(a)f(pointer)g(in)h(the)f(instance)h(object)
e(to)g(a)h(method)g(table)f(containing)37 997 y(the)k(addr)o(esses)g(of)g
(the)g(method)g(functions.)29 b(Inheritance)16 b(is)g(implemented)f(such)h
(that)f(the)g(instance)37 1054 y(variables)e(ar)o(e)f(mer)o(ged)g(into)h(the)
g(instance)g(object,)g(and)f(the)h(methods)f(ar)o(e)g(mer)o(ged)h(into)g(the)
f(method)37 1110 y(table.)k(All)10 b(the)f(r)o(efer)o(ences)h(ar)o(e)e(r)o
(esolved)h(at)f(compile)i(time.)16 b(When)10 b(executing)g(a)f(function,)j
(the)d(pseudo)37 1167 y(variable)g Fe(this)e Ff(is)i(bound)g(to)g(the)f(curr)
o(ent)i(object.)15 b(The)8 b(variable)g Fe(this)g Ff(can)h(be)g(used)f(to)h
(r)o(efer)f(to)g(the)h(object's)37 1223 y(instance)k(variables)e(and)g
(methods.)108 1283 y(In)18 b Fe(Smalltalk)e Ff([2])h(an)g(operation)g(on)g
(an)g(instance)g(object)f(is)h(performed)g(by)g(sending)h(the)f(object)37
1340 y(a)g(message)g(describing)h(which)g(operation)f(needs)g(to)f(be)h
(executed.)33 b(A)18 b(method)e(is)i(made)e(up)h(of)g(a)37
1396 y(message)d(pattern)e(and)h(a)g(set)f(of)h(expr)o(essions.)23
b(The)13 b(corr)o(ect)f(method)h(is)g(selected)g(by)g(comparing)h(the)37
1453 y(message)k(and)f(the)g(method)g(description.)35 b(Inheritance)18
b(is)g(implemented)g(thr)o(ough)g(an)g Fe(inheritance)37 1509
y(chain)p Ff(.)27 b(This)15 b(chain)h(describes)e(fr)o(om)h(which)h(class)f
(the)f(curr)o(ent)i(class)f(is)g(cr)o(eated.)25 b(By)14 b(following)i(the)37
1566 y(inheritance)d(chain,)f(the)f(system)h(is)f(able)g(to)g(\256nd)g(the)g
(instance)h(variables)f(and)g(method)g(de\256nitions)h(of)37
1622 y(super)o(classes.)28 b(In)15 b Fe(Smalltalk)f Ff(two)g(pseudo)h
(variables)f(exist)h(which)g(point)g(either)g(to)f(the)g(object)g(itself)37
1679 y(\()p Fe(self)t Ff(\))d(or)h(to)f(the)h(super)h(class)f(object)g(in)g
(which)h(the)f(method)g(or)g(instance)h(variable)e(is)h(de\256ned)g(\()p
Fe(super)p Ff(\).)37 1735 y Fe(Self)i Ff(is)d(the)f(object)g(which)i(r)o
(eceives)e(the)h(method)f(r)o(equest)h(message.)17 b(When)11
b(r)o(efer)o(encing)h Fe(self)t Ff(,)d(method)37 1791 y(determination)15
b(starts)g(at)f(bottom)g(of)h(the)f(inheritance)i(chain,)h(when)e(r)o(efer)o
(encing)h(to)f Fe(super)e Ff(method)37 1848 y(determination)f(starts)f(in)h
(the)f(object)g(r)o(eferr)o(ed)g(at)g(by)h Fe(super)p Ff(.)108
1908 y(The)7 b(major)g(dif)o(fer)o(ence)g(between)g Fe(Smalltalk)g
Ff(and)g Fe(C++)g Ff(is)g(that)g Fe(Smalltalk)g Ff(is)g(an)g(interpr)o(eted)g
(language)37 1965 y(and)14 b Fe(C++)f Ff(is)h(a)f(compiled)h(language.)23
b(In)14 b Fe(C++)f Ff(the)h(method)f(table)g(and)g(used)h(instance)g
(variables)f(ar)o(e)37 2021 y(determined)c(statically)g(\(i.e.)17
b(when)9 b(a)f(the)h(pr)o(ogram)g(is)h(compiled\).)16 b(In)10
b Fe(Smalltalk)p Ff(,)g(you)f(send)g(a)g(message)37 2078 y(to)j(an)f(object)g
(which)i(will)f(determine)f(if)h(it)f(has)h(implemented)g(the)g(operation.)k
(If)c(not,)g(the)g(message)f(is)37 2134 y(forwar)o(ded)g(thr)o(ough)i(the)e
(inheritance)h(chain.)37 2367 y Fg(3)60 b(Prototype)15 b(Based)e(Languages)37
2480 y Ff(In)18 b(a)f(pr)o(ototype)g(based)g(language)h(only)g(one)f(object)g
(type)g(exists.)35 b(This)18 b(object)f(type)g(contains)h(the)37
2536 y(instance)g(variables)f(of)f(the)h(objects)g(and)f(the)h(behaviour)g
(of)g(the)f(object.)33 b(If)17 b(another)g(object)f(wants)37
2593 y(to)i(shar)o(e)g(some)g(behaviour)g(of)g(the)g(former)g(object,)h(a)f
(new)g(object)f(is)h(cr)o(eated)g(in)g(which)h(only)g(the)37
2649 y(idiosyncracies)13 b(of)d(the)h(new)g(object)f(ar)o(e)g(stor)o(ed.)16
b(If)11 b(the)g(new)g(object)f(r)o(eceives)g(a)h(message)g(informing)h(it)p
37 2708 735 2 v 87 2735 a Fc(1)105 2751 y Fb(Although)d(I)h(state)g(this)g
(explicitly)l(,)h(some)f(object)g(oriented)g(system)g(don)g(not)h(even)f
(have)f(seperate)h(class)f(objects.)16 b Fa(C++)p Fb(,)37 2796
y(for)10 b(example,)g(only)f(supports)h(instance)e(objects)945
2921 y Ff(2)p eop
%%Page: 3 3
bop 37 199 a Ff(to)8 b(do)f(something,)j(and)e(the)g(object)f(hasn't)h
(implemented)h(the)e(operation,)i(the)f(operation)g(is)g(forwar)o(ded)37
256 y(or)k Fe(delegated)d Ff(to)i(the)h(pr)o(ototype)f(object)g([3].)108
314 y(If,)18 b(for)e(example,)j(you)d(ar)o(e)g(implementing)i(a)e(pr)o
(ototype)h(based,)g(object)f(oriented,)h(windowing)37 371 y(system,)12
b(you)f(would)f(implement)h(a)f(pr)o(ototype)g(object)g(which)h(implements)h
(the)e(common)h(behaviour)37 427 y(of)h(windows)h(\(such)g(as)f(dragging)h
(the)f(window)g(acr)o(oss)h(the)f(scr)o(een\),)h(while)g(the)f(derived)f
(object)g(may)37 483 y(contain)16 b(the)f(physical)i(location)e(of)g(the)g
(window)l(.)27 b(In)15 b(a)g(pr)o(ototype)g(based)g(system)g(it)g(is)g
(possible)h(to)37 540 y(use)e(both)f(the)g(shar)o(ed)g(behaviour)g(of)g
(objects)f(while)h(de\256ning)i(\252extra\272)d(behaviour)h(for)g(an)g
(object.)20 b(If,)37 596 y(for)11 b(example,)g(some)g(object)e(has)i(special)
g(behaviour)g(when)g(a)f(window)g(is)h(dragged)f(acr)o(oss)h(the)f(scr)o(een)
37 653 y(\(such)18 b(as)e(cr)o(eating)h(a)f(contr)o(ol)h(window\),)h(the)e
(window)h(can)f(still)h(use)g(the)f(common)h(behaviour)g(by)37
709 y(\256rst)11 b(executing)g(the)f(extra)f(behaviour)h(befor)o(e)g
(delegating)g(a)g Fe(drag-window)f Ff(message)h(to)f(the)h(pr)o(ototype)37
766 y(object.)108 824 y(Self)f([5])h(implements)g(a)g(pr)o(ototype)f(based,)h
(object)f(oriented)g(system.)16 b(In)11 b(this)f(system)g(every)f(object)37
881 y(contains)15 b(a)f(list)g(of)g(slots)h(which)g(describe)f(the)g
(instance)g(variables)g(or)g(object)f(methods.)24 b(T)l(o)14
b(r)o(etrieve)37 937 y(the)g(value)f(of)h(an)g(instance)g(variable)f(or)h(to)
f(execute)g(a)h(method,)g(a)f(message)h(is)g(sent)g(to)f(the)h(object.)23
b(If)37 994 y(the)17 b(object)f(does)g(not)g(have)g(a)g(slot)g(for)h(the)f(r)
o(equest,)j(the)d(message)h(is)f(delegated)g(to)g(the)g(pr)o(ototype)37
1050 y(object)11 b(\(all)g(the)g(way)g(to)g(the)g(top)g(object,)g(if)g(no)g
(object)g(has)g(a)g(slot)g(for)g(the)g(r)o(equest\).)18 b(In)12
b(Self)f(the)g(pseudo)37 1106 y(variable)f Fe(self)j Ff(r)o(efers)d(to)g(the)
h(object)e(which)j(r)o(eceives)e(the)g(\256rst)h(\(original\))h(message.)17
b(When)11 b(the)f(r)o(equest)37 1163 y(is)j(delegated)e(to)h(a)g(pr)o
(ototype,)h Fe(self)h Ff(still)f(r)o(efers)f(to)g(the)h(original)g(object.)18
b(This)13 b(way)-5 b(,)13 b(methods)f(de\256ned)37 1219 y(in)h(a)e(pr)o
(ototype)g(ar)o(e)g(still)h(able)f(to)g(r)o(efer)h(to)f(the)g(original)h
(object.)37 1439 y Fg(4)60 b(Prototypes)14 b(vs.)22 b(Classes)37
1548 y Ff(At)12 b(a)g(\256rst)g(glance,)h(pr)o(ototype)e(based)h(systems)g
(work)g(much)h(like)f(class)g(based)g(systems.)18 b(However)m(,)11
b(if)37 1605 y(you)i(take)e(a)h(closer)g(look)f(at)h(the)g(dif)o(fer)o(ences)
g(between)g(both)g(systems,)h(you)f(\256nd)g(that)g(ther)o(e)g(ar)o(e)f(some)
37 1661 y(inter)o(esting)i(issues.)108 1720 y(In)e(class)g(based)f(systems,)i
(you)f(always)f(end)g(up)i(cr)o(eating)e(at)g(least)g(two)g(objects)g(to)g(r)
o(epr)o(esent)h(some)37 1776 y(object.)16 b(Y)l(ou)9 b(\256rst)g(pr)o(ogram)g
(the)g(class)g(object)f(befor)o(e)g(you)i(instantiate)f(the)f(\252r)o
(eal\272)g(object.)15 b(In)10 b(pr)o(ototype)37 1833 y(based)15
b(systems,)h(you)f(simply)g(pr)o(ogram)g(the)f(object.)26 b(Pr)o(ototype)14
b(based)g(systems,)i(ther)o(efor)o(e,)g(\252feel\272)37 1889
y(better)f(when)i(you)f(ar)o(e)f(writing)i(small)f(applications)h(or)f(try)f
(to)h(pr)o(ototype)f(some)h(pr)o(oblem.)30 b(If)17 b(you)37
1945 y(have)h(pr)o(ogrammed)h(your)f(object,)i(and)e(you)h(want)f(to)g(model)
g(a)g(new)h(object)e(which)j(shar)o(es)f(state)37 2002 y(and)12
b(behaviour)g(with)g(the)g(pr)o(ototype)g(object,)g(you)g(can)g(simply)h
(make)f(the)g(new)g(object)f(and)h(delegate)37 2058 y(r)o(equests)h(for)f
(the)g(shar)o(ed)g(behaviour)h(to)e(the)h(pr)o(ototype.)19
b(Any)13 b(object)e(in)i(the)f(system)h(can)f(be)g(made)f(a)37
2115 y(pr)o(ototype)h(object.)17 b(This)c(pr)o(ovides)e(a)h(very)f
(\257exible)h(way)g(of)f(pr)o(ogramming)i(new)f(objects.)17
b(However)m(,)37 2171 y(this)10 b(can)f(also)f(lead)g(to)h(\252spaghetti\272)
f(object)g(systems)i(wher)o(e)e(objects)h(ar)o(e)f(dependening)h(on)g(pr)o
(ototypes,)37 2228 y(while)j(the)g(pr)o(ototypes)g(ar)o(e,)f(again,)h
(depending)g(on)g(other)f(pr)o(ototypes.)108 2286 y(Class)16
b(based)g(systems)g(have)f(a)h(clear)f(distinction)i(between)e(shar)o(ed)h
(behaviour)g(and)f(instances.)37 2343 y(The)e(shar)o(ed)f(behaviour)g(is)g
(stor)o(ed)g(in)h(the)f(class)g(objects)g(while)g(the)h(instance)f(variables)
g(ar)o(e)g(stor)o(ed)f(in)37 2399 y(the)k(instance)h(objects.)27
b(If)15 b(an)g(object)f(shar)o(es)h(behaviour)g(and)g(data)f(with)h(some)f
(other)h(class)g(but)h(has)37 2455 y(some)c(peculiarities,)i(you)e(have)f(to)
h(cr)o(eate)f(a)g(\252subclass\272)i(to)e(captur)o(e)i(the)e(special)i
(behaviour)f(and)g(use)37 2512 y(the)g(shar)o(ed)f(part)h(fr)o(om)f(the)h
(\252super)o(class\272.)108 2570 y(Instance)20 b(objects)f(\252feel\272)f
(mor)o(e)h(active)f(than)h(class)h(objects,)h(in)f(the)f(sense)g(that)g(by)g
(sending)h(a)37 2627 y(message)11 b(to)g(an)g(instance)g(object,)g(you)g(can)
g(change)h(the)e(object.)16 b(Y)l(ou)11 b(don't)f(send)h(messages)h(to)e(a)g
(class)37 2683 y(object)h(to)f(change)i(a)e(class)h(object,)g(you)g(take)g
(the)f(class)i(object)e(into)h(your)g(editor)f(and)h(update)g(the)f(class)37
2740 y(object.)16 b(It)8 b(takes)h(mor)o(e)f(ef)o(fort)h(to)f(change)h(a)f
(class)i(object.)15 b(In)9 b(a)f(pr)o(ototype)h(based)f(system,)i(many)f
(objects)37 2796 y(can)15 b(depend)f(on)h(a)f(pr)o(ototype)g(object.)25
b(This)15 b(means)g(that)f(if)h(the)f(pr)o(ototype)g(object)g(changes,)i(all)
f(the)945 2921 y(3)p eop
%%Page: 4 4
bop 37 199 a Ff(other)10 b(objects)f(also)g(change.)17 b(Although)11
b(this)g(might)f(seem)f(handy)-5 b(,)11 b(it)f(also)f(means)h(that)f(you)h
(have)f(to)g(be)37 256 y(very)j(car)o(eful)g(when)h(you)f(update)g(a)f(pr)o
(ototype)h(object.)18 b(Y)l(ou)12 b(have)g(to)f(know)h(the)g(object)f
(dependency)37 312 y(graph)h(of)g(the)f(objects)g(derived)f(fr)o(om)i(the)f
(pr)o(ototype)g(object,)g(in)h(or)o(der)f(to)g(do)g(a)g(safe)g(update.)16
b(I.e.)i(you)37 369 y(don't)13 b(want)g(the)g(objects)f(which)i(ar)o(e)f
(depending)g(on)h(the)f(pr)o(ototype)g(object)f(to)g(stop)h(working)h(if)f
(you)37 425 y(update)g(the)f(pr)o(ototype.)19 b(In)13 b(a)f(class)h(based)f
(system,)i(instance)f(objects)f(ar)o(e)g(only)h(depending)g(on)f(class)37
482 y(objects.)31 b(Class)17 b(objects)e(might)i(be)f(depending)h(on)f(other)
g(class)h(objects.)30 b(If)17 b(you)f(change)h(the)f(class)37
538 y(object,)c(you)h(know)g(that)e(you)i(ar)o(e)f(going)h(to)f(change)h(the)
f(behaviour)g(of)g(the)g(instance)h(objects)f(and/or)37 594
y(subclasses,)k(i.e.)22 b(changing)16 b(a)c(class)i(is)g(mor)o(e)f(explicit.)
23 b(It)13 b(seems)h(that)f(in)h(a)e(class)i(based)f(system,)h(you)37
651 y(ar)o(e)d(mor)o(e)f(awar)o(e)g(of)h(the)g(fact)f(that)h(some)f(objects)h
(ar)o(e)f(depending)i(on)f(the)f(behaviour)h(of)g(other)f(objects)37
707 y(wher)o(eas)g(in)g(pr)o(ototype)f(based)g(systems,)i(it)e(can)h(be)f
(totally)g(unclear)h(which)h(objects)e(ar)o(e)g(depending)h(on)37
764 y(which)k(other)e(objects.)19 b(In)13 b(general,)h(the)e(class)h
(inheritance)g(tr)o(ee)f(is)h(mor)o(e)f(visible)h(than)g(the)f(pr)o(ototype)
37 820 y(dependency)g(chains.)108 877 y(Class)i(based)g(systems)g(can)g(be)f
(implemented)h(in)h(a)e(pr)o(ototype)h(based)f(system.)24 b(This)14
b(is)g(done)g(by)37 934 y(explicitly)h(de\256ning)f(\252class\272)f(objects)g
(which)h(contain)f(the)g(shar)o(ed)g(behaviour)g(for)g(a)g(class)g(of)g
(objects.)37 990 y(If)k(some)g(object)e(wants)i(to)f(shar)o(e)h(some)f
(behaviour)h(with)g(a)f(class)h(object,)g(but)g(the)f(new)h(object)f(has)37
1047 y(some)h(peculiarities,)i(a)d(\252subclass\272)i(object)d(is)i(cr)o
(eated)f(which)i(holds)f(the)f(peculiarities.)33 b(Next,)18
b(the)37 1103 y(new)c(object)f(is)h(instantiated)g(fr)o(om)g(the)f(subclass,)
j(by)e(sending)h(the)e(subclass)j(a)d Fe(clone)h Ff(message.)23
b(This)37 1159 y(operation)9 b(causes)g(the)f(cr)o(eation)h(of)f(a)g(new)h
(object)e(in)i(which)h(the)e(instance)i(variables)e(of)g(the)h(class)g
(object)37 1216 y(ar)o(e)15 b(cloned,)h(and)e(the)h(methods)g(ar)o(e)f
(accessed)g(by)h(delegating)g(a)f(message)h(to)g(the)f(class)h(object.)26
b(If)15 b(a)37 1272 y(subclass)f(r)o(eceives)e(a)g(message)g(which)i(is)f
(implemented)f(by)h(the)f(\252super)o(class\272,)i(the)e(subclass)i(simply)37
1329 y(delegates)i(the)g(message)g(to)g(the)g(super)o(class.)32
b(Recall)17 b(that)f(in)g(a)g(delegation)g(based)g(system)g(the)g
Fe(self)37 1385 y Ff(variable)11 b(is)h(bound)g(to)g(the)f(object)g(which)i
(r)o(eceives)e(the)g(message)h(\256rst.)18 b(In)12 b(or)o(der)f(to)g(access)h
(a)f(method)37 1442 y(which)j(is)f(de\256ned)g(in)g(the)f(subclass,)j(the)d
(super)o(class)i(can)f(simply)h(delegate)d(a)h(message)h(to)f(the)h(object)37
1498 y Fe(self)t Ff(.)i(However)m(,)8 b(this)h(strategy)g(doesn't)f(pr)o
(event)h(people)g(fr)o(om)g(building)h(\252spaghetti\272)f(object)f(systems.)
37 1555 y(It)k(is)g(still)g(possible)g(to)f(cr)o(eate)g(objects)g(which)i(ar)
o(e)e(solely)h(depending)g(on)g(\252instance\272)f(objects.)108
1611 y(The)k(r)o(everse,)h(however)m(,)f(is)h(not)f(true.)28
b(It)15 b(is)h(not)f(possible)h(to)f(build)h(a)e(pr)o(ototype)i(based)e
(system)37 1668 y(on)h(top)f(of)h(a)f(class)h(based)f(system.)26
b(The)15 b(r)o(eason)f(is)h(that)f(the)h Fe(self)h Ff(variable)e(in)h(a)f
(class)h(based)f(system)37 1724 y(is)j(bound)g(to)f(the)h(object)e(r)o
(eceiving)i(the)g(message.)32 b(If)16 b(a)g(message)h(is)g(delegated)e(fr)o
(om)i(an)f(instance)37 1781 y(object)d(to)g(another)h(instance)g(object,)g
(the)f Fe(self)j Ff(variable)d(will)h(r)o(efer)g(to)f(the)g(object)g(which)i
(r)o(eceives)e(the)37 1837 y(delegated)e(message.)19 b(For)12
b(a)g(delegation)f(based)h(system,)h(the)f(self)g(variable)f(needs)h(to)g(be)
g(r)o(eferring)g(to)37 1894 y(the)k(object)f(which)h(delegated)e(the)i
(message.)29 b(This)16 b(can)g(be)f(solved)g(by)h(passing)g(a)f(r)o(efer)o
(ence)h(to)f(the)37 1950 y(original)j(object)d(as)i(a)f(parameter)m(,)h(when)
f(a)g(message)h(is)g(delegated.)30 b(However:)c(I)16 b(consider)h(this)g(a)37
2007 y(hack.)j(Another)12 b(possibility)i(would)e(be)g(to)f(attach)h(code)f
(blocks)i(to)f(class)g(variables.)18 b(When)c(an)e(object)37
2063 y(is)g(instantiated,)g(the)g(code)e(block)i(is)g(cloned)g(in)g(the)f
(new)h(object.)k(This)c(I)g(consider)g(also)f(a)g(hack)1727
2047 y Fd(2)1746 2063 y Ff(.)108 2120 y(Pr)o(ototype)i(based)f(systems)h
(always)f(need)h(to)f(r)o(esolve)g(method)g(and)g(instance)h(variables)f
(starting)37 2176 y(fr)o(om)k(the)g(object)f(which)i(originally)f(r)o
(eceived)f(the)h(message.)29 b(If)16 b(that)g(object)f(has)h(implemented)g
(its)37 2233 y(own)k(idiosyncratic)g(method)f(or)g(instance)h(variable,)g(a)f
(new)g(lookup)h(has)g(to)f(be)g(done)f(along)i(the)37 2289
y(delegation)10 b(chain,)h(starting)e(fr)o(om)h(the)f Fe(self)i
Ff(variable.)16 b(If)10 b(the)f(pr)o(ototype)g(based)g(system)h(uses)g
(messages)37 2346 y(to)i(communicate)h(between)f(objects,)h(executing)g(some)
f(expr)o(essions)i(might)g(end)e(up)h(in)g(sending)g(and)37
2402 y(r)o(eceiving)i(a)f(lot)g(of)g(messages)g(between)g(objects.)24
b(In)15 b(class)f(based)g(systems,)i(this)f(is)f(not)g(the)g(case.)25
b(It)37 2459 y(is)12 b(not)f(possible)i(to)e(go)g(back)g(on)h(the)f
(inheritance)h(chain)h(when)e(r)o(esolving)h(methods)g(and/or)e(instance)37
2515 y(variables.)28 b(This)16 b(also)f(means)g(that)g(class)h(based)f
(systems)g(can)h(be)f(implemented)g(without)h(sending)37 2572
y(messages)h(to)e(objects,)h Fe(C++)f Ff(for)h(example,)h(has)f(implemented)g
(the)f(inheritance)i(chain)g(in)f(a)f(simple)p 37 2616 735
2 v 87 2643 a Fc(2)105 2659 y Fb(Ther)o(e)7 b(exists)g(a)g(language)e(which)i
(allows)g(a)g(hybrid)f(form)i(of)g(class)e(and)h(pr)o(ototype)i(based)d
(objects.)13 b(Whenever)7 b(an)g(object)37 2705 y(is)12 b(instantiated)e(in)h
(Python)g([6],)i(an)e(empty)h(sub-class)e(is)h(cr)o(eated.)20
b(Messages)11 b(to)h(this)f(empty)h(sub-class)e(ar)o(e)h(delegated)f(to)37
2751 y(the)i(\252r)o(eal\272)e(class.)19 b(If)12 b(an)e(object)h(wants)g(to)h
(implement)g(special)e(behaviour)m(,)h(you)h(can)e(install)h(a)g(new)g
(method)g(\(or)h(instance)37 2796 y(variable\))d(in)g(the)g(dynamic)f
(sub-class)f(by)i(sending)f(the)h(sub-class)f(an)h Fa(install-method)g
Fb(message.)945 2921 y Ff(4)p eop
%%Page: 5 5
bop 37 199 a Ff(array)11 b(of)h(functions)h(and/or)e(instance)h(variables)923
183 y Fd(3)941 199 y Ff(.)37 405 y Fg(5)60 b(Conclusions)37
510 y Ff(Although)17 b(pr)o(ototype)d(systems)h(and)f(class)h(based)f
(systems)h(have)f(many)h(things)g(in)g(common,)h(ther)o(e)37
567 y(ar)o(e)e(some)g(subtle)h(dif)o(fer)o(ences)g(between)e(the)h(two)g
(appr)o(oaches.)25 b(When)15 b(it)f(comes)h(to)e(building)j(lar)o(ge)37
623 y(systems)j(with)f(many)g(objects,)h(using)g(a)f(class)g(based)f(system)h
(seems)g(to)f(make)h(mor)o(e)f(sense.)36 b(The)37 680 y(r)o(eason)12
b(for)g(this)g(is)g(that)g(class)g(based)f(systems)h(for)o(ce)g(the)g(pr)o
(ogrammer)f(to)h(think)g(about)g(the)f(common)37 736 y(behaviour)i(of)f(a)g
(set)g(of)g(objects,)h(and)f(to)g(place)g(this)h(common)g(behaviour)f(in)h(a)
f(seperate)f(class)i(object.)37 793 y(In)18 b(a)f(pr)o(ototype)h(based)e
(system,)k(the)d(pr)o(ogrammer)h(can)f(put)h(common)f(behaviour)h(in)g(any)f
(object,)37 849 y(ther)o(eby)e(making)f(dependencies)h(between)e(live)g
(objects.)24 b(Changing)15 b(a)f(pr)o(ototype)g(object,)g(which)h(is)37
905 y(simplier)i(than)e(changing)i(the)e(class,)i(might)f(r)o(esult)f(in)h
(obscur)o(e)f(err)o(ors)g(in)h(other)f(objects)f(which)i(ar)o(e)37
962 y(depending)g(on)f(the)f(pr)o(ototype)h(object.)26 b(If,)16
b(however)m(,)f(small)g(systems)g(ar)o(e)f(built)i(with)f(many)g(single)37
1018 y(objects,)c(the)f(pr)o(ototype)g(based)f(system)h(might)h(be)f(mor)o(e)
g(r)o(easonable)g(since)g(the)g(pr)o(ogrammer)g(doesn't)37
1075 y(need)i(to)f(cr)o(eate)g(a)g(class)h(description)g(\256rst)g(befor)o(e)
f(objects)g(can)h(be)f(cr)o(eated:)16 b(the)c(pr)o(ogrammer)g(simply)37
1131 y(pr)o(ograms)g(the)g(object.)37 1337 y Fg(References)37
1480 y Ff([1])23 b(Mar)o(gar)o(et)12 b(A.)g(Ellis)h(and)f(Bjarne)f(Str)o
(oustrup.)19 b Fe(The)11 b(Annotated)i(C++)e(Refer)o(ence)g(Manual)p
Ff(.)19 b(Addison-)113 1536 y(W)l(esley)-5 b(,)12 b(1991.)37
1630 y([2])23 b(Adele)11 b(Golber)o(g)h(and)f(David)g(Robson.)18
b Fe(SmallT)-5 b(alk-80,)11 b(The)f(Language)p Ff(.)17 b(Addison-W)l(esley)-5
b(,)14 b(1989.)37 1724 y([3])23 b(H.)e(Lieberman.)43 b(Using)22
b(pr)o(ototypical)g(object)e(to)h(implement)h(shar)o(ed)f(behaviour)g(in)h
(object-)113 1780 y(oriented)13 b(systems.)23 b(In)14 b Fe(OOPSLA)g('86)e
(\(october\).)i(Object-Orientated)g(Pr)o(ogramming)f(Systems,)g(Lan-)113
1837 y(guages)f(and)h(Applications.)f(Confer)o(ence)h(Pr)o(oceedings)p
Ff(,)f(volume)h(21,)g(pages)g(214\261223,)f(Portland,)i(OR,)113
1893 y(USA,)f(November)d(1986.)37 1987 y([4])23 b(Bjarne)7
b(Str)o(oustrup.)k(What)e(is)f(\252object-oriented)f(pr)o(ogramming\272?)19
b(In)8 b(G.)g(Goos)f(and)h(J.)h(Hartmanis,)113 2043 y(editors,)17
b Fe(Pr)o(oc.)f(Eur)o(opean)f(Conf.)h(on)g(Object-Oriented)f(Pr)o(ogramming)p
Ff(,)i(Paris)f(\(France\),)i(June)e(1987.)113 2100 y(Springer)o(-V)-5
b(erlag,)13 b(Lectur)o(e)e(Notes)g(in)h(Computer)g(Science)g(no.)g(276.)37
2194 y([5])23 b(David)9 b(Ungar)g(and)g(Randall)g(B.)g(Smith.)j(Self:)k(The)9
b(power)f(of)h(simplicity)-5 b(.)14 b(In)9 b(Norman)g(Meyr)o(owitz,)113
2250 y(editor)m(,)f Fe(Pr)o(oceedings)f(of)g(the)g(OOPSLA)m('87)g(confer)o
(ence)p Ff(,)g(pages)g(227\261242,)g(Orlando)g(FL)g(\(USA\),)g(October)113
2307 y(1987.)k(ACM.)37 2400 y([6])23 b(Guido)18 b(van)f(Rossum)i(and)f(Jelke)
f(de)h(Boer)m(.)32 b(Interactibely)18 b(testing)g(r)o(emote)f(servers)h
(using)h(the)113 2457 y(python)13 b(pr)o(ogramming)g(language.)k
Fe(CWI)12 b(Quarterly)p Ff(,)f(4\(4\):283\261303,)f(December)h(1991.)p
37 2662 735 2 v 87 2689 a Fc(3)105 2705 y Fb(Note)h(that)g(I'm)h(not)f
(trying)f(to)i(say)f(that)g(pr)o(ototype)i(based)d(cannot)g(be)h(implemented)
g(ef)o(\256ciently)f(but)h(these)g(systems)37 2751 y(always)g(need)g(to)h
(traverse)e(the)h(complete)h(dependency)e(chain)g(fr)o(om)i(the)g(base)e
(object)h(to)h(r)o(esolve)f(a)g(method)h(or)f(instance)37 2796
y(variable)945 2921 y Ff(5)p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
%%EOF