Skip to Main content Skip to Navigation
New interface
Conference papers

BLOC: a Trait-Based Collections Library – a Preliminary Experience Report

Tristan Bourgois 1 Jannik Laval 1 Stéphane Ducasse 1 Damien Pollet 1 
1 RMOD - Analyses and Languages Constructs for Object-Oriented Application Evolution
LIFL - Laboratoire d'Informatique Fondamentale de Lille, Inria Lille - Nord Europe
Abstract : A trait is a programming construct which provides code reusability. Traits are groups of methods that can be reused orthogonally from inheritance. Traits offer a solution to the problems of multiple inheritance by providing a behavior-centric modularity. Since traits offer an alternative to traditional inheritance-based code reuse, a couple of questions arise. For example, what is a good granularity for a Trait enabling reuse as well as plug ease? How much reuse can we expect on large existing inheritance-based hierarchies? In this paper we take as case study the Smalltalk Collection hierarchy and we start rewriting it from scratch using traits from the beginning. We show how such library can be built using traits and we report such a preliminary experience. Since the Collection library is large, we focused and built the main classes of the library with Traits and report problems we encountered and how we solved them. Results of this experience are positive and show that we can build new collections based on the traits used to define the new library kernel.
Document type :
Conference papers
Complete list of metadata

Cited literature [18 references]  Display  Hide  Download
Contributor : Lse Lse Connect in order to contact the contributor
Submitted on : Friday, August 27, 2010 - 1:18:20 PM
Last modification on : Thursday, January 20, 2022 - 5:31:20 PM
Long-term archiving on: : Thursday, December 1, 2016 - 9:20:49 AM


Files produced by the author(s)


  • HAL Id : inria-00511902, version 2


Tristan Bourgois, Jannik Laval, Stéphane Ducasse, Damien Pollet. BLOC: a Trait-Based Collections Library – a Preliminary Experience Report. International Workshop on Smalltalk Technologies, Sep 2010, Barcelona, Spain. ⟨inria-00511902v2⟩



Record views


Files downloads