Thumbnail
Access Restriction
Subscribed

Author Black, Andrew P. ♦ Ducasse, Stéphane ♦ Schärli, Nathanael
Source ACM Digital Library
Content type Text
Publisher Association for Computing Machinery (ACM)
File Format PDF
Language English
Subject Domain (in DDC) Computer science, information & general works ♦ Computer programming, programs & data
Subject Keyword Collection hierarchy ♦ Smalltalk ♦ Mixins ♦ Inheritance ♦ Multiple inheritance ♦ Reuse ♦ Refactoring ♦ Stream classes ♦ Traits
Abstract Traits are a programming language technology that promote the reuse of methods between unrelated classes. This paper reports on a refactoring of the Smalltalk collections classes using traits. The original collection classes contained much duplication of code; traits let us remove all of it. We also found places where the protocols of the collections lacked uniformity; traits allowed us to correct these non-uniformities without code duplication.Traits also make it possible to reuse fragments of collection code outside of the existing hierarchy; for example, they make it easy to convert other collection-like things into true collections. Our refactoring reduced the number of methods in the collection classes by approximately 10 per cent. More importantly, understandability maintainability and reusability of the code were significantly improved.
Description Affiliation: University of Bern, Switzerland (Schärli, Nathanael; Ducasse, Stéphane) || Oregon Health and Science University (Black, Andrew P.)
Age Range 18 to 22 years ♦ above 22 year
Educational Use Research
Education Level UG and PG
Learning Resource Type Article
Publisher Date 1983-05-01
Publisher Place New York
Journal ACM SIGPLAN Notices (SIGP)
Volume Number 38
Issue Number 11
Page Count 18
Starting Page 47
Ending Page 64


Open content in new tab

   Open content in new tab
Source: ACM Digital Library