Applying Traits to the Smalltalk Collection Hierarchy

Black, Andrew P.; Schärli, Nathanael; Ducasse, Stéphane (2002). Applying Traits to the Smalltalk Collection Hierarchy Universität Bern, Switzerland: Universität Bern

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

Download (653kB) | Request a copy

Traits are a programming language technology modeled after mixins but avoiding their problems. In this paper we refactor the Smalltalk collections hierarchy using traits. We observed that the original hierarchy contained much duplication of code; traits let us remove all of it. Traits also make possible much more general reuse 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 size of the collection hierarchy by approximately 12 per cent, with no measurable impact on execution efficiency. More importantly, understandability and reusability of the code was significantly improved, and the path was paved for a more intensive refactoring.

Item Type:

Report (Report)


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

UniBE Contributor:

Ducasse, Stephane


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


Universität Bern




Manuela Bamert

Date Deposited:

04 Dec 2017 09:09

Last Modified:

12 Nov 2019 19:14

Additional Information:

Also available as Technical Report CSE-02-014, OGI School of Science & Engineering, Beaverton, Oregon, USA

Publiziert in: OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications 38. ACM




Actions (login required)

Edit item Edit item
Provide Feedback