classes are premature optimization · object system. peter deutsch the past, present, and future of...
TRANSCRIPT
![Page 1: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/1.jpg)
Classes Are Premature Optimization
Justin Lovehttp://pinboard.in/u:wondible/t:prototypal/
http://pinboard.in/u:wondible/t:oop/
![Page 3: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/3.jpg)
Outline
• OOP
• Classical
• Prototypal
• Performance
• Review
![Page 4: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/4.jpg)
OOP?
![Page 5: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/5.jpg)
class ____ { ...}
![Page 6: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/6.jpg)
object ____ { ...}
![Page 7: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/7.jpg)
Class Oriented?
class ____ { ...}
![Page 8: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/8.jpg)
OOP-or-
COP?
![Page 9: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/9.jpg)
OOP
![Page 10: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/10.jpg)
Those who do not remember history are condemned to repeat it.
George Santayana
![Page 11: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/11.jpg)
(Chances are I’m repeating it right now.)
![Page 12: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/12.jpg)
Alan Kay
![Page 13: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/13.jpg)
3things
OOP
![Page 14: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/14.jpg)
EncapsulationLocal
RetentionProtection
Hidingof State-process
![Page 15: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/15.jpg)
Genericity
Commonly, PolymophisimAlan Kay spoke of Algebras
Extreme late binding
![Page 16: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/16.jpg)
Messaging
Object decides how to react.
![Page 17: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/17.jpg)
OOP
EncapsulationGenericityMessaging
![Page 18: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/18.jpg)
Classes
![Page 19: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/19.jpg)
Inheritance
![Page 20: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/20.jpg)
“Five words
objectmessageclassinstancemethod
make up the vocabulary with which Smalltalk
is discussed.”
Smalltalk-80, The Language, p.51
![Page 21: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/21.jpg)
Smalltalk 71727680
Classes
Inheritance
Metaclasses
![Page 22: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/22.jpg)
Alan Kay2003
“So I decided to leave out inheritance as a built-in feature until I understood it better.”
![Page 23: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/23.jpg)
Alan Kay2003
“[...] backslid towards Simula and did not replace the extension mechanisms with safer ones that were anywhere near as useful.”
![Page 24: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/24.jpg)
Classical
![Page 25: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/25.jpg)
Sketchpad
1963
![Page 26: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/26.jpg)
Generalvs.
Specific
![Page 27: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/27.jpg)
Simula-67
C++Javaetc.
![Page 28: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/28.jpg)
Classes Instances
![Page 29: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/29.jpg)
Segregation
![Page 30: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/30.jpg)
Plato
Formvs.
Matter
![Page 31: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/31.jpg)
Descriptionvs.
Representation
![Page 32: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/32.jpg)
Classes Instances
![Page 33: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/33.jpg)
![Page 34: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/34.jpg)
Metaclass
“Class of classes”
![Page 35: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/35.jpg)
![Page 36: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/36.jpg)
![Page 37: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/37.jpg)
RubyRuby Logo © 2006, Yukihiro Matsumoto
![Page 38: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/38.jpg)
I’m not smart enough for Ruby’s
object system.
![Page 39: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/39.jpg)
Peter DeutschThe Past, Present, and Future of Smalltalk
1989
“metaclasses have proven confusing to many users, and perhaps in the balance more confusing than valuable.”
![Page 40: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/40.jpg)
Accidental Complexity
![Page 41: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/41.jpg)
William of Ockham
“entia non sunt multiplicanda praeter necessitatem”
![Page 42: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/42.jpg)
William of Ockham
“entities must not be multiplied beyond necessity”
![Page 43: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/43.jpg)
Prototypal
![Page 44: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/44.jpg)
Henry LiebermanOOPSLA 1986
http://web.media.mit.edu/~lieber/Lieberary/OOP/Delegation/Delegation.html
Using Prototypical Objects to Implement Shared Behavior in Object Oriented Systems
![Page 45: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/45.jpg)
Self
1987
![Page 46: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/46.jpg)
![Page 47: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/47.jpg)
![Page 48: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/48.jpg)
![Page 49: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/49.jpg)
![Page 50: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/50.jpg)
Abstractions
Objects
(Classes)
![Page 51: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/51.jpg)
Objects
Abstractions?
![Page 52: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/52.jpg)
one
one = object.clone
![Page 53: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/53.jpg)
one two
two = one.clone
![Page 54: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/54.jpg)
P
one two three .....
one = proto.clonetwo = proto.clone
three = proto.clone
![Page 55: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/55.jpg)
YouAin’tGonnaNeed It
![Page 56: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/56.jpg)
Singleton
![Page 57: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/57.jpg)
Singleton (in JS)
var singleton = { ...};
![Page 58: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/58.jpg)
Ex-Nihilo
“Out of Nothing”
![Page 59: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/59.jpg)
Singleton: Self
clone = (self)
![Page 60: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/60.jpg)
Prototypal Singleton
singleton.clone = function() { return this;};
![Page 61: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/61.jpg)
Hard-core Singleton
function Singleton() { return Singleton.prototype;}
![Page 62: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/62.jpg)
Near Miss
![Page 63: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/63.jpg)
Near Miss
![Page 64: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/64.jpg)
Near MissDay
Kin
![Page 65: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/65.jpg)
Near Miss
var kin = day.clone("Kin");
![Page 66: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/66.jpg)
Near Miss
clone: function(name) { var o = Object.create(this); o.name = name; ... return o;},
![Page 67: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/67.jpg)
Near Miss
... // independent existence. o.scale = 0; o.position = 0; o.time = 0; ...
![Page 68: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/68.jpg)
Object.create()
• ES5
• Firefox 4
• Safari 5
• Chrome 5+
• http://kangax.github.com/es5-compat-table/
![Page 69: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/69.jpg)
Object.create()
Object.create = function(o) { function F() {}; F.prototype = (o || {}); return new F();}
http://javascript.crockford.com/prototypal.html
![Page 70: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/70.jpg)
Nested Context
![Page 71: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/71.jpg)
Nested Context
Like {block scope}.
(Or function scope in Javascript.)
![Page 72: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/72.jpg)
Nested Context
under: function(path, f) { var m = Object.create(this); m.cd(path); f(m);},
![Page 73: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/73.jpg)
Performance
![Page 74: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/74.jpg)
Structured Memory
![Page 75: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/75.jpg)
Programming as Experience:The Inspiration for Self
1995
Self runs
“2.3 times slower than optimized C++.”
![Page 76: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/76.jpg)
Self includes: SmalltalkMario Wolczko
“all [sample] Smalltalk programs run faster in the the Self system, some significantly more so.”
![Page 77: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/77.jpg)
Omega
1990Statically-typed prototypes
![Page 78: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/78.jpg)
Design-Timevs.
Run-Time
![Page 79: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/79.jpg)
Kevo
1993Concatative
‘Clone families’
![Page 80: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/80.jpg)
Lisaac
2003Compiled.
44% slower to 17% fasterthan c.
http://www.lisaac.org/documentation/benchmarks
![Page 81: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/81.jpg)
V8 Logo © 2006 Google
V82008
![Page 82: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/82.jpg)
V8 Logo © 2006 Google
Generated Code
![Page 83: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/83.jpg)
V8 Logo © 2006 Google
Hidden Classes
![Page 84: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/84.jpg)
Javascript
1996
![Page 85: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/85.jpg)
Javascript
Is not an Object-Oriented Programming Language
![Page 86: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/86.jpg)
Genericity
PASS
![Page 87: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/87.jpg)
Messaging
FAIL*Partial support in ES5 and Harmony
![Page 88: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/88.jpg)
Encapsulation
FAIL*Work-around with closure.
![Page 89: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/89.jpg)
Peter DeutschThe Past, Present, and Future of Smalltalk
1989
“inheriting implementation [...] tends to create difficulties in subsequent evolution and often reflects insufficient understanding.”
![Page 90: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/90.jpg)
Copyvs.
Delegation
![Page 91: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/91.jpg)
Shared Data
![Page 92: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/92.jpg)
Shared Data
![Page 93: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/93.jpg)
Shared Data
![Page 94: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/94.jpg)
Shared Data
......
...
...
......
![Page 95: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/95.jpg)
Seph
Stateless Delgation
http://olabini.com/blog/2010/07/preannouncing-seph/
![Page 96: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/96.jpg)
Sparse Objects
![Page 97: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/97.jpg)
Sparse Objects
![Page 98: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/98.jpg)
Sparse Objects
new Disk('Minute', unit.MS_S, 1, T("seconds/minute"), { colors: '#d22'})
![Page 99: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/99.jpg)
Sparse Objectsnew Disk('Solar Year', unit.MS_D, T("days/~month"), 12, { colors: ['blue', 'green', 'orange', 'brown'], ...
![Page 100: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/100.jpg)
Sparse Objects
... majorNames: ['~January'...], subDivide: 4, major: 3*4, median: 1*4, ...
![Page 101: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/101.jpg)
Sparse Objects
... render: function(context) { context.save(); context.rotate( 6.28 * -9 / 365); ...
![Page 102: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/102.jpg)
Flyweight
![Page 103: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/103.jpg)
Flyweight
![Page 104: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/104.jpg)
Flyweight
![Page 105: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/105.jpg)
Flyweight
![Page 106: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/106.jpg)
Flyweight
item: function(d) { var i = Object.create(this); i.dot = d; return i;},
![Page 107: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/107.jpg)
Shared Behavior
![Page 108: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/108.jpg)
Shared Behavior
![Page 109: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/109.jpg)
Shared Behavior
![Page 110: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/110.jpg)
Shared Behaviormint: function( head, pattern, action) { var my = this.dup(); my.head = head; my.pattern = pattern; my.action = action; return my;},
![Page 111: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/111.jpg)
Shared Behavior
dup: function() { return Object.create(this);},
![Page 112: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/112.jpg)
*
*
*
![Page 113: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/113.jpg)
Prototype
Instances
![Page 114: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/114.jpg)
Do I use class patterns?
![Page 115: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/115.jpg)
YES
![Page 116: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/116.jpg)
Do I use class patterns
for everything?
![Page 117: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/117.jpg)
NO
![Page 118: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/118.jpg)
a
Objects
Classes
![Page 119: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/119.jpg)
a
Self
Smalltalk
![Page 120: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/120.jpg)
Classesare aUsefulPattern
![Page 121: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/121.jpg)
But notthe onlyPattern
![Page 122: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/122.jpg)
Use Classes
Because You Want To
![Page 123: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/123.jpg)
Use Classes
Because You Have To
Not
![Page 124: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/124.jpg)
Review
![Page 125: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/125.jpg)
History
![Page 126: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/126.jpg)
OOP
![Page 127: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/127.jpg)
Classical
![Page 128: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/128.jpg)
Prototypal
![Page 129: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/129.jpg)
Performance
![Page 130: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/130.jpg)
We’re Stuck with
Javascript
![Page 131: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/131.jpg)
Learn How to Use It
![Page 132: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/132.jpg)
Prototype
Instances
![Page 133: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/133.jpg)
Shared Behavior
![Page 134: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/134.jpg)
Shared Data
![Page 135: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/135.jpg)
Singleton
![Page 136: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/136.jpg)
Flyweight
![Page 137: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/137.jpg)
Nested Context
![Page 138: Classes Are Premature Optimization · object system. Peter Deutsch The Past, Present, and Future of Smalltalk 1989 ... Using Prototypical Objects to Implement Shared Behavior in Object](https://reader033.vdocuments.net/reader033/viewer/2022042117/5e95e1a1182713235e1f15f9/html5/thumbnails/138.jpg)
Justin [email protected]
http://wondible.com
@wondible
http://pinboard.in/u:wondible/t:prototypal/http://pinboard.in/u:wondible/t:oop/