Book contents
- Frontmatter
- Contents
- FOREWORD
- PREFACE
- INTRODUCTION
- 1 A DIAGRAM FOR OBJECT-ORIENTED PROGRAMS
- 2 CONSTRUCTING ABSTRACTIONS FOR OBJECT-ORIENTED APPLICATIONS
- 3 PLAYRGOUND: AN OBJECT ORIENTED SIMULATION SYSTEM WITH AGENT RULES FOR CHILDREN OF ALL AGES
- 4 A LABORATORY FOR TEACHING OBJECT-ORIENTED THINKING
- 5 THINK LIKE AN OBJECT
- 6 WHY STUDY SMALLTALK IDIOMS?
- 7 THE DREADED SUPER
- 8 ABSTRACT CONTROL IDIOMS
- 9 VALUEMODEL IDIOMS
- 10 COLLECTION IDIOMS
- 11 AN OBJECTWORKS\SMALLTALK 4.1 WRAPPER IDIOM
- 12 A SHORT INTRODUCTION TO PATTERN LANGUAGE
- 13 WHOLE LOTTA SMALLTALK: THE TECHNOLOGY
- 14 INSTANCE-SPECIFIC BEHAVIOR: HOW AND WHY
- 15 INSTANCE-SPECIFIC BEHAVIOR: DIGITALK IMPLEMENTATION AND THE DEEPER MEANING OF IT ALL
- 16 TO ACCESSOR OR NOT TO ACCESSOR
- 17 INHERITANCE: THE REST OF THE STORY
- 18 INHERITANCE: THE REST OF THE STORY (CONT.)
- 19 HELPER METHODS AVOID UNWANTED INHERITANCE
- 20 IT'S NOT JUST THE CASE
- 21 CRC: FINDING OBJECTS THE EASY WAY
- 22 DEATH TO CASE STATEMENTS
- 23 WHERE DO OBJECTS COME FROM?
- 24 PATTERNS AND SOFTWARE DEVELOPMENT
- 25 DISTRIBUTED SMALLTALK
- 26 WHERE DO OBJECTS COME FROM? FROM VARIABLES AND METHODS
- 27 BIRDS, BEES, AND BROWSERS—OBVIOUS SOURCES OF OBJECTS
- 28 USING PATTERNS: DESIGN
- 29 PATTERNS GENERATE ARCHITECTURES
- 30 SIMPLE SMALLTALK TESTING
- 31 ARCHITECTURAL PROTOTYPE: TELEVISION REMOTE CONTROL
- 32 DEMAND LOADING FOR VISUALWORKS
- 33 GARBAGE COLLECTION REVEALED
- 34 WHAT? WHAT HAPPENED TO GARBAGE COLLECTION?
- 35 SUPER + 1
- 36 CLEAN CODE: PIPE DREAM OR STATE OF MIND?
- 37 A MODEST META PROPOSAL
- 38 USES OF VARIABLES: TEMPS
- 39 VARIABLES OF THE WORLD
- 40 PATTERNS 101
- 41 FAREWELL AND A WOOD PILE
- AFTERWORD
- INDEX
14 - INSTANCE-SPECIFIC BEHAVIOR: HOW AND WHY
Smalltalk Report, March–April, 1993
Published online by Cambridge University Press: 04 August 2010
- Frontmatter
- Contents
- FOREWORD
- PREFACE
- INTRODUCTION
- 1 A DIAGRAM FOR OBJECT-ORIENTED PROGRAMS
- 2 CONSTRUCTING ABSTRACTIONS FOR OBJECT-ORIENTED APPLICATIONS
- 3 PLAYRGOUND: AN OBJECT ORIENTED SIMULATION SYSTEM WITH AGENT RULES FOR CHILDREN OF ALL AGES
- 4 A LABORATORY FOR TEACHING OBJECT-ORIENTED THINKING
- 5 THINK LIKE AN OBJECT
- 6 WHY STUDY SMALLTALK IDIOMS?
- 7 THE DREADED SUPER
- 8 ABSTRACT CONTROL IDIOMS
- 9 VALUEMODEL IDIOMS
- 10 COLLECTION IDIOMS
- 11 AN OBJECTWORKS\SMALLTALK 4.1 WRAPPER IDIOM
- 12 A SHORT INTRODUCTION TO PATTERN LANGUAGE
- 13 WHOLE LOTTA SMALLTALK: THE TECHNOLOGY
- 14 INSTANCE-SPECIFIC BEHAVIOR: HOW AND WHY
- 15 INSTANCE-SPECIFIC BEHAVIOR: DIGITALK IMPLEMENTATION AND THE DEEPER MEANING OF IT ALL
- 16 TO ACCESSOR OR NOT TO ACCESSOR
- 17 INHERITANCE: THE REST OF THE STORY
- 18 INHERITANCE: THE REST OF THE STORY (CONT.)
- 19 HELPER METHODS AVOID UNWANTED INHERITANCE
- 20 IT'S NOT JUST THE CASE
- 21 CRC: FINDING OBJECTS THE EASY WAY
- 22 DEATH TO CASE STATEMENTS
- 23 WHERE DO OBJECTS COME FROM?
- 24 PATTERNS AND SOFTWARE DEVELOPMENT
- 25 DISTRIBUTED SMALLTALK
- 26 WHERE DO OBJECTS COME FROM? FROM VARIABLES AND METHODS
- 27 BIRDS, BEES, AND BROWSERS—OBVIOUS SOURCES OF OBJECTS
- 28 USING PATTERNS: DESIGN
- 29 PATTERNS GENERATE ARCHITECTURES
- 30 SIMPLE SMALLTALK TESTING
- 31 ARCHITECTURAL PROTOTYPE: TELEVISION REMOTE CONTROL
- 32 DEMAND LOADING FOR VISUALWORKS
- 33 GARBAGE COLLECTION REVEALED
- 34 WHAT? WHAT HAPPENED TO GARBAGE COLLECTION?
- 35 SUPER + 1
- 36 CLEAN CODE: PIPE DREAM OR STATE OF MIND?
- 37 A MODEST META PROPOSAL
- 38 USES OF VARIABLES: TEMPS
- 39 VARIABLES OF THE WORLD
- 40 PATTERNS 101
- 41 FAREWELL AND A WOOD PILE
- AFTERWORD
- INDEX
Summary
After the brief pause in the previous column to discuss philosophy, this column descends again into the depths of techno-minutiae. At least I talked about why you'd want to use instance-specific behavior, and didn't just present it as:“Here's a cool thing you can do with Smalltalk.”
The pattern Scriptable Objects still looks pretty good to me. In fact, I like it better as a pattern than many of the patterns that follow.
This and the next column will discuss technical and philosophical matters. The technical material covers implementing and using instance-specific behavior, the idea that you can attach methods to individual instances rather than to a class. You might use it in animation or in building a Hypercard-like system. It is not a new idea. Lisp-based object systems have had it for years, and languages like Self rely on it exclusively. It is not well known in the Smalltalk community, though, and deserves a place in the mature Smalltalker's bag of tricks.
The philosophical material illuminates the differences between Digitalk's and ParcPlace's view of good Smalltalk style. ParcPlace grew out of a research atmosphere where truth and beauty were admired. Although established in business now, ParcPlace continues to favor elegant solutions. Digitalk has always been driven by the desire to build commercial software and has often been staffed with engineers whose experience comes from other languages. Digitalk's solutions tend to be more pragmatic and the workings easier to follow operationally, even if they don't have the most elegant high-level models.
- Type
- Chapter
- Information
- Kent Beck's Guide to Better SmalltalkA Sorted Collection, pp. 157 - 166Publisher: Cambridge University PressPrint publication year: 1997