Applying Traits to the Smalltalk Collection Hierarchy

Black, Andrew P.; Schärli, Nathanael; Ducasse, Stéphane (October 2003). Applying Traits to the Smalltalk Collection Hierarchy. In: OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications 38 (pp. 47-64). ACM 10.1145/949305.949311

[img] Text
Blac03aTraitsHierarchy.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (268kB)

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.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG) [discontinued]

UniBE Contributor:

Ducasse, Stephane

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

ISBN:

1-58113-712-5

Publisher:

ACM

Language:

English

Submitter:

Anja Ebeling

Date Deposited:

22 Nov 2017 13:30

Last Modified:

11 Apr 2024 16:11

Publisher DOI:

10.1145/949305.949311

BORIS DOI:

10.7892/boris.104401

URI:

https://boris.unibe.ch/id/eprint/104401

Actions (login required)

Edit item Edit item
Provide Feedback