Traits at Work: the design of a new trait-based stream library

Abstract : Recent years saw the development of a composition mechanism called Traits. Traits are pure units of behavior that can be composed to form classes or other traits. The trait composition mechanism is an alternative to multiple or mixin inheritance in which the composer has full control over the trait composition. To evaluate the expressiveness of traits, some hierarchies were refactored, showing code reuse. However, such large refactorings, while valuable, may not exhibit all possible composition problems, since the hierarchies were previously expressed using single inheritance and following certain patterns. This paper presents our work on designing and implementing a new trait-based stream library named Nile. It evaluates how far traits enable reuse, what problems can be encountered when building a library using traits from scratch and compares the traits solution to alternative composition mechanisms. Nile's core allows the de?nition of compact collection and ?le streaming libraries as well as the implementation of a backward-compatible new stream library. Nile method size shows a reduction of 40% compared to the Squeak equivalent. The possibility to reuse the same set of traits to implement two distinct libraries is a concrete illustration of trait reuse capability.
Type de document :
Article dans une revue
Computer Languages, Systems and Structures, Elsevier, 2008, 〈10.1016/j.cl.2008.05.004〉
Liste complète des métadonnées

Littérature citée [19 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/inria-00216108
Contributeur : Lse Lse <>
Soumis le : vendredi 27 février 2009 - 22:37:28
Dernière modification le : jeudi 11 janvier 2018 - 06:22:25
Document(s) archivé(s) le : jeudi 27 septembre 2012 - 17:40:36

Fichier

Cass08a-NileNewKernel-Computer...
Fichiers produits par l'(les) auteur(s)

Identifiants

Citation

Damien Cassou, Stéphane Ducasse, Roel Wuyts. Traits at Work: the design of a new trait-based stream library. Computer Languages, Systems and Structures, Elsevier, 2008, 〈10.1016/j.cl.2008.05.004〉. 〈inria-00216108〉

Partager

Métriques

Consultations de la notice

317

Téléchargements de fichiers

158