BLOC: a Trait-Based Collections Library – a Preliminary Experience Report - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2010

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

Résumé

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.
Fichier principal
Vignette du fichier
main.pdf (419.08 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

inria-00511902 , version 1 (26-08-2010)
inria-00511902 , version 2 (27-08-2010)

Identifiants

  • HAL Id : inria-00511902 , version 2

Citer

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⟩
307 Consultations
196 Téléchargements

Partager

Gmail Facebook X LinkedIn More