The main focus of this work is on identifying interesting and important aspects of introducing traits to CSharp. We also identify required and optional features for statically typed languages as well as conflict situations. The implementation presented in this paper is a simple prototype (a preprocessor) based on the trait flattening property [9]. It is meant to be a study case for a clean implementation.
The main problem concerning traits and statically typed languages like CSharp is about typing traits and to keep the ability to share code easily. Many approaches already exist in theory. This practical work contributes to the research about traits by presenting a simple prototype, showing the possibilities and difficulties in integrating traits in statically typed languages.
Although the focus of this work is on CSharp most of the results are directly applicable to other typed object-oriented languages. The implemented “trait flattening framework”, kept mostly language independent, would also work for most other c-like languages (with only slight modification).
Section 2 shortly introduces traits. The following sections cover the basics about CSharp, give a short overview about a first dirty-prototype done in CSharp itself and contain some more extensive descriptions, results and practical research by doing the final implementation using Smalltalk.
Download pdf Traits in CSharp
Related Searches: object oriented languages, conflict situations, share code, practical research, study case
RSS feed for comments on this post · TrackBack URI
Leave a reply