Encapsulation and inheritance in object-oriented programming languages
OOPLSA '86 Conference proceedings on Object-oriented programming systems, languages and applications
OOPSLA '87 Conference proceedings on Object-oriented programming systems, languages and applications
The annotated C++ reference manual
The annotated C++ reference manual
OOPSLA/ECOOP '90 Proceedings of the European conference on object-oriented programming on Object-oriented programming systems, languages, and applications
Organizing programs without classes
Lisp and Symbolic Computation
Eiffel: the language
The revised report on the syntactic theories of sequential control and state
Theoretical Computer Science
ACM SIGPLAN Notices
The programming language jigsaw: mixins, modularity and multiple inheritance
The programming language jigsaw: mixins, modularity and multiple inheritance
Back to the future: the story of Squeak, a practical Smalltalk written in itself
Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Space and time-efficient memory layout for multiple inheritance
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Interfaces with default implementations in Java
PPPJ '02/IRE '02 Proceedings of the inaugural conference on the Principles and Practice of programming, 2002 and Proceedings of the second workshop on Intermediate representation engineering for virtual machines, 2002
Object-Oriented Multi-Methods in Cecil
ECOOP '92 Proceedings of the European Conference on Object-Oriented Programming
Applying traits to the smalltalk collection classes
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Traits: A mechanism for fine-grained reuse
ACM Transactions on Programming Languages and Systems (TOPLAS)
ISC'06 Proceedings of the 14th international conference on Advances in smalltalk
User-changeable visibility: resolving unanticipated name clashes in traits
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Technologies for Evolvable Software Products: The Conflict between Customizations and Evolution
Advances in Software Engineering
SC '09 Proceedings of the 8th International Conference on Software Composition
Adding State and Visibility Control to Traits Using Lexical Nesting
Genoa Proceedings of the 23rd European Conference on ECOOP 2009 --- Object-Oriented Programming
Featherweight Jigsaw: A Minimal Core Calculus for Modular Composition of Classes
Genoa Proceedings of the 23rd European Conference on ECOOP 2009 --- Object-Oriented Programming
CZ: multiple inheritance without diamonds
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Groovy package templates: supporting reuse and runtime adaption of class hierarchies
DLS '09 Proceedings of the 5th symposium on Dynamic languages
A calculus for uniform feature composition
ACM Transactions on Programming Languages and Systems (TOPLAS)
Implementing software product lines using traits
Proceedings of the 2010 ACM Symposium on Applied Computing
A prototypical Java-like language with records and traits
Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java
MetaFJig: a meta-circular composition language for Java-like classes
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Read-only execution for dynamic languages
TOOLS'10 Proceedings of the 48th international conference on Objects, models, components, patterns
Reuse and combination with package templates
Proceedings of the 4th Workshop on MechAnisms for SPEcialization, Generalization and inHerItance
Modular composition and state update in Plaid
Proceedings of the 4th Workshop on MechAnisms for SPEcialization, Generalization and inHerItance
Reconciling method overloading and dynamically typed scripting languages
Computer Languages, Systems and Structures
JavaGI: The Interaction of Type Classes with Interfaces and Inheritance
ACM Transactions on Programming Languages and Systems (TOPLAS)
First-class state change in plaid
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
Flexible object layouts: enabling lightweight language extensions by intercepting slot access
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
DeepFJig: modular composition of nested classes
Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
Talents: dynamically composable units of reuse
Proceedings of the International Workshop on Smalltalk Technologies
Featherweight Jigsaw - Replacing inheritance by composition in Java-like languages
Information and Computation
Challenges in the design of the package template mechanism
Transactions on Aspect-Oriented Software Development IX
Using roles to model crosscutting concerns
Proceedings of the 12th annual international conference on Aspect-oriented software development
Context traits: dynamic behaviour adaptation through run-time trait recomposition
Proceedings of the 12th annual international conference on Aspect-oriented software development
TraitRecordJ: A programming language with traits and records
Science of Computer Programming
Correctness of intrusive data structures using mixins
Proceedings of the 16th International ACM Sigsoft symposium on Component-based software engineering
Pure trait-based programming on the Java platform
Proceedings of the 2013 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
Hi-index | 0.00 |
Traits offer a fine-grained mechanism to compose classes from reusable components while avoiding problems of fragility brought by multiple inheritance and mixins. Traits as originally proposed are stateless, that is, they contain only methods, but no instance variables. State can only be accessed within stateless traits by accessors, which become required methods of the trait. Although this approach works reasonably well in practice, it means that many traits, viewed as software components, are artificially incomplete, and classes that use such traits may contain significant amounts of boilerplate glue code. We present an approach to stateful traits that is faithful to the guiding principle of stateless traits: the client retains control of the composition. Stateful traits consist of a minimal extension to stateless traits in which instance variables are purely local to the scope of a trait, unless they are explicitly made accessible by the composing client of a trait. We demonstrate by means of a formal object calculus that adding state to traits preserves the flattening property: traits contained in a program can be compiled away. We discuss and compare two implementation strategies, and briefly present a case study in which stateful traits have been used to refactor the trait-based version of the Smalltalk collection hierarchy.