Skip to main content Accessibility help
×
Hostname: page-component-7479d7b7d-rvbq7 Total loading time: 0 Render date: 2024-07-13T14:44:03.975Z Has data issue: false hasContentIssue false

19 - HELPER METHODS AVOID UNWANTED INHERITANCE

Smalltalk Report, October, 1993

Published online by Cambridge University Press:  04 August 2010

Kent Beck
Affiliation:
First Class Software, Inc.
Get access

Summary

This column is really just an application of Composed Method to deal with inheritance. Now I always try to make my code fragments be real code, no As, Bs, and Cs. You can see why from the example here that is written the other way.

The column is interesting in that it contains some of the first explicit links between patterns. Down at the end it says, “Use Composed Method if necessary to set this pattern up.” I paid considerably more attention to pattern linking when I wrote the pattern book, and I'll probably pay a lot more attention with my next set of patterns.

Patterns in isolation are all very interesting, but it is when they are linked together that they become powerful. It is only then that you can explain a simple solution to a problem, because you know that the rest of the solution was handled by previous patterns or will be handled by future patterns.

The topic of this issue's column on Smalltalk idioms, following the general theme of inheritance, is how to manage the use of super. Several issues back I wrote a column entitled “The Dreaded Super,” in which I catalogued all the legitimate (and otherwise) uses of super in the existing Smalltalk/V and VisualWorks images. I'm still very proud of that column, but a couple of days ago I discovered I had left out one very important technique in dealing with super.

Type
Chapter
Information
Kent Beck's Guide to Better Smalltalk
A Sorted Collection
, pp. 195 - 200
Publisher: Cambridge University Press
Print publication year: 1997

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×