Redesigning with traits: the Nile stream trait-based library

  • Authors:
  • Damien Cassou;Stéphane Ducasse;Roel Wuyts

  • Affiliations:
  • University of Savoie, France;University of Savoie, France;Leuven and Université Libre de Bruxelles

  • Venue:
  • ICDL '07 Proceedings of the 2007 international conference on Dynamic languages: in conjunction with the 15th International Smalltalk Joint Conference 2007
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Recently, traits have been proposed as a single inheritance backward compatible solution in which the composing entity has the control over the trait composition. Traits are fine-grained units used to compose classes, while avoiding many of the problems of multiple inheritance and mixin-based approaches. To evaluate the expressiveness of traits, some hierarchies were refactored, showing code reuse. However, such large refactorings, while valuable, may not be facing all the problems, since the hierarchies were previously expressed within single inheritance and following certain patterns. We wanted to evaluate how traits enable reuse, and what problems could be encountered when building a library using traits from scratch, taking into account that traits are units of reuse. This paper presents our work on designing a new stream library named Nile. We present the reuse that we attained using traits, and the problems we encountered.