Dynamic Traits

Traits were introduced by Schärli et al. as reusable units of behaviour. Recently, the stateful version of traits was presented. In our work, we have reused stateful traits for dynamic composition. Dynamic traits can be dynamically bound on an object reference and thus specialize the object behaviour dynamically and contextually. Especially interesting feature of dynamic traits appears to be dynamic overloading mechanism, which can simplify transformations on structured data. This paper presents principles of dynamic traits, motivation examples and the language of dynamic traits.

[1]  Giuseppe Castagna,et al.  Covariance and contravariance: conflict without a cause , 1995, TOPL.

[2]  Craig Chambers,et al.  Object-Oriented Multi-Methods in Cecil , 1992, ECOOP.

[3]  Christophe Dony,et al.  Split objects: a disciplined use of delegation within objects , 1996, OOPSLA '96.

[4]  Erik Ernst Dynamic inheritance in a statically typed language , 1999 .

[5]  Gary T. Leavens,et al.  Multiple dispatch as dispatch on Tuples , 1998, OOPSLA '98.

[6]  Wolfram Schulte,et al.  The essence of data access in Cω: the power is in the dot! , 2005 .

[7]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[8]  Craig Chambers,et al.  Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications , 1998, OOPSLA 1998.

[9]  Oscar Nierstrasz,et al.  Traits: The Formal Model ? , 2003 .

[10]  Aaron Turon,et al.  A foundation for trait-based metaprogramming , 2005 .

[11]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[13]  Sophia Drossopoulou,et al.  Towards Type Inference for JavaScript , 2005, ECOOP.

[14]  Gary T. Leavens,et al.  MultiJava: modular open classes and symmetric multiple dispatch for Java , 2000, OOPSLA '00.

[15]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[16]  Günter Kniesel Implementation of Dynamic Delegation in Strongly Typed Inheritance-Based Systems , 1995 .

[17]  Sophia Drossopoulou,et al.  Chai: Traits for Java-Like Languages , 2005, ECOOP.

[18]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[19]  Joyce Farrell Java Programming , 1999 .

[20]  Jonathan Aldrich,et al.  Prototypes with Multiple Dispatch: An Expressive and Dynamic Object Model , 2005, ECOOP.

[21]  Randall B. Smith,et al.  SELF: The power of simplicity , 1987, OOPSLA '87.