Results 1 -
7 of
7
Traits: Composable Units of Behavior
, 2002
"... Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that ..."
Abstract
-
Cited by 123 (31 self)
- Add to MetaCart
Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that arise with these forms of inheritance. We then present a simple compositional model for structuring object-oriented programs, which we call traits. Traits are essentially groups of methods that serve as building blocks for classes and are primitive units of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state.
Traits: A mechanism for fine-grained reuse
- Transactions on Programming Languages and Systems
, 2006
"... Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages. Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an application into an optimal class hierarchy that maximizes software reuse. Existing schemes based on single i ..."
Abstract
-
Cited by 60 (18 self)
- Add to MetaCart
Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages. Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an application into an optimal class hierarchy that maximizes software reuse. Existing schemes based on single inheritance, multiple inheritance, or mixins, all pose numerous problems for reuse. To overcome these problems we propose traits, pure units of reuse consisting only of methods. We develop a formal model of traits that establishes how traits can be composed, either to form other traits, or to form classes. We also outline an experimental validation in which we apply traits to refactor a non-trivial application into composable units.
Traits: Composable units of behaviour
- In Proc. European Conference on Object-Oriented Programming
, 2003
"... Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems. In the first part of this p ..."
Abstract
-
Cited by 32 (0 self)
- Add to MetaCart
Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems. In the first part of this paper, we identify and illustrate these problems. We then present traits, a simple compositional model for structuring object-oriented programs. A trait is essentially a group of pure methods that serves as a building block for classes and is a primitive unit of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising from the different variants of inheritance, we discuss how traits can be implemented effectively, and we summarize our experience applying traits to refactor an existing class hierarchy.
An Object-Oriented Refinement Calculus with Modular Reasoning
, 1992
"... In this thesis, the refinement calculus is extended to support a variety of object-oriented programming styles. The late binding of procedure calls in object-oriented languages is modelled by defining an object-oriented system to be a function from procedure names and argument values to the procedur ..."
Abstract
-
Cited by 15 (1 self)
- Add to MetaCart
In this thesis, the refinement calculus is extended to support a variety of object-oriented programming styles. The late binding of procedure calls in object-oriented languages is modelled by defining an object-oriented system to be a function from procedure names and argument values to the procedures that are invoked by late binding. The first model allows multiple dispatch late binding, in the style of CLOS. This model is then specialised to the single dispatch case, giving a model that associates types with objects, which is similar to existing class based object-oriented languages. Both models are then restricted so that they support modular reasoning. The concept of modular reasoning has been defined informally in the literature, both for non-object-oriented systems and for object-oriented systems. This thesis gives the first formal definition of modular reasoning for object-oriented languages. Intuitively, the definition seems to capture the minimum possible requirements necessa...
MASPEGHI 2004 - Mechanisms for Specialization, Generalization and Inheritance
- In ECOOP Workshops
, 2004
"... MASPEGHI 2004 is the third edition of the MASPEGHI workshop. This year the organizers of both the ECOOP 2002 Inheritance Workshop and MASPEGHI 2003 came together to enlarge the scope of the workshop and to address new challenges. We succeeded in gathering a diverse group of researchers and pract ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
MASPEGHI 2004 is the third edition of the MASPEGHI workshop. This year the organizers of both the ECOOP 2002 Inheritance Workshop and MASPEGHI 2003 came together to enlarge the scope of the workshop and to address new challenges. We succeeded in gathering a diverse group of researchers and practitioners interested in mechanisms for managing specialization and generalization of programming language components. The workshop contained a series of presentations with discussions as well as group work, and the interplay between the more than 22 highly skilled and inspiring people from many di#erent communities gave rise to fruitful discussions and the potential for continued collaboration.
Subtyping and Inheritance in Object-Oriented Programming
, 2000
"... Subtyping and inheritance belong to the major concepts in contemporary object-oriented programming languages, their presence having decisively inuenced the success of the objectoriented paradigm. Inheritance constitutes a technique for reusing code from previous endeavours, while subtyping establish ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Subtyping and inheritance belong to the major concepts in contemporary object-oriented programming languages, their presence having decisively inuenced the success of the objectoriented paradigm. Inheritance constitutes a technique for reusing code from previous endeavours, while subtyping establishes semantic relationships between object behaviors. Although these, in principle, independent and autonomous notions are rooted in dierent domains of programming, their distinction is poorly understood at large. The necessity is recognized to investigate the notions of types, implementations, subtyping, and inheritance in theory and practice. After presenting these concepts in a language-independent fashion, we contrast subtyping with inheritance, and elaborate the integration of these mechanisms in two dierent object-oriented programming languages. We conclude that the separation is essential both in strongly-typed and dynamically-typed programming languages, facilitating the design in terms of object behaviors to be distinguished from implementation.
Supporting Java Traits in Eclipse
"... Traits are a language technology that complements inheritance as a means for code reuse and class structuring. Traits encapsulate collections of methods so that they can be used and reused anywhere in the inheritance hierarchy. An important property of traits is that classes structured with traits h ..."
Abstract
- Add to MetaCart
Traits are a language technology that complements inheritance as a means for code reuse and class structuring. Traits encapsulate collections of methods so that they can be used and reused anywhere in the inheritance hierarchy. An important property of traits is that classes structured with traits have the same semantics as classes structured without them. With environment support, a programmer can move freely between views of the system with or without its component traits. In this paper we describe an environment for programming with traits for Java implemented in Eclipse. 1.

