Techreport,

Adding Traits to (Statically Typed) Languages

, , , and .
Technical Report, IAM-05-006. Institut für Informatik, Universität Bern, Switzerland, (December 2005)

Abstract

Traits offer a fine-grained mechanism for composing classes in object-oriented languages from reusable components, while avoiding the fragility problems introduced by multiple inheritance and mixins. Although traits were developed in the context of dynamically typed languages, they would also offer clear benefits for statically typed languages like Java and C\#. This report summarizes the issues raised when integrating traits into such languages. We examine traits in the context of the statically typed languages FeatherweightJava, C\# and C++.

Tags

Users

  • @gron

Comments and Reviews