• LOGIN
Repository logo

BORIS Portal

Bern Open Repository and Information System

  • Publication
  • Projects
  • Funding
  • Research Data
  • Organizations
  • Researchers
  • LOGIN
Repository logo
Unibern.ch
  1. Home
  2. Publications
  3. Traits: Composing Classes from Behavioral Building Blocks
 

Traits: Composing Classes from Behavioral Building Blocks

Options
  • Details
BORIS DOI
10.7892/boris.104766
Date of Publication
February 2005
Publication Type
thesis
Author
Schärli, Nathanael
Language
English
Description
Inheritance is well-known and accepted as a fundamental mechanism for reuse in object-oriented languages. Unfortunately, the main variants —- single inheritance, multiple inheritance, and mixin inheritance —- all suffer from conceptual and practical problems related to software reuse and robustness with respect to changes. In a rst part of this thesis, we identify and illustrate these problems. To overcome these problems, we then present traits, a simple compositional model that extends single inheritance. A trait is essentially a (parameterized) set of methods; it serves as a behavioral building block for classes and is the primitive unit of code reuse. We develop a formal model of traits that establishes how traits can be composed to form other traits or classes, and we describe how we implemented traits in Squeak Smalltalk by bootstrapping a new language kernel. We present our experimental validation in which we apply traits to refactor parts of the Smalltalk kernel and library, and we develop a programming methodology around the usage of traits and the trait browser, the tool that we implemented to take full advantage of the availability of traits in the Squeak programming environment.
Related URL
http://scg.unibe.ch/archive/phd/schaerli-phd.pdf
Handle
https://boris-portal.unibe.ch/handle/20.500.12422/199420
Show full item
File(s)
FileFile TypeFormatSizeLicensePublisher/Copright statementContent
schaerli-phd.pdftextAdobe PDF1.59 MBpublisherpublished restricted
BORIS Portal
Bern Open Repository and Information System
Build: d1c7f7 [27.06. 13:56]
Explore
  • Projects
  • Funding
  • Publications
  • Research Data
  • Organizations
  • Researchers
More
  • About BORIS Portal
  • Send Feedback
  • Cookie settings
  • Service Policy
Follow us on
  • Mastodon
  • YouTube
  • LinkedIn
UniBe logo