Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-m8qmq Total loading time: 0 Render date: 2024-04-18T08:33:36.419Z Has data issue: false hasContentIssue false

11 - AN OBJECTWORKS\SMALLTALK 4.1 WRAPPER IDIOM

Smalltalk Report, January, 1993

Published online by Cambridge University Press:  04 August 2010

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

Summary

Here is a great example of a column I wish I'd never written. It presents a new control structure to deal with the complexity of the Composite/Wrapper pattern used in the user interface code in Visual Works. I wrote the column, sent it off, then had a quick talk with David Liebs about the subject. “So you need to talk to a particular wrapper, eh? Why don't you keep a pointer to the wrapper you need to talk to and give it a useful name? Then you can just send it messages.” Duh…

The other aspect of the column I regret is that it seems to condone adding new control structures to Smalltalk. The meta facilities of Smalltalk are extremely powerful, but 99.99 percent of the time, you shouldn't use them. Oh, they'd get the job done alright, but at what cost?

When you write something like #wrapperSend:, you have to take off your application-programmer hat and put on your language-designer hat. The responsibilities of the language designer are ten times as great as those of an application developer. Whatever you do, you have to implement it and test it, sure, but you also have to document it like a new language feature, extend the programming environment to handle it smoothly, and worst of all, maintain it through all future releases of the image.

Type
Chapter
Information
Kent Beck's Guide to Better Smalltalk
A Sorted Collection
, pp. 129 - 136
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
×