Abstract

Traits are a well-known simple, but powerful compositional model for reuse. Although traits already implemented in dynamically typed languages, they're not yet practically realized in statically typed languages. Typing traits and adapting the model to these languages is more complex to achieve. We report on our experience and practical research implementing traits in C\# 2.0, concerning generics. We show the difficulties and possible solutions of typing and parameterizing traits in generally, possible enhancements for statically typed languages as well as adapting traits to C\# regarding features like overriding and hiding.

Description

Traits

Links and resources

Tags