You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PragTob edited this page Jan 19, 2013
·
11 revisions
Reconciling Classes and Traits - Module systems course at HPI
We're trying to make any class usable as a trait in a Master's course at HPI's Software Architecture Group.
Principles
programmers need to specify ambiguous cases:
conflicts at compile-time
conflicts don't change including classes
tool support to show programmers what needs to be decided
Limitations
Variable sized classes → for now not allowed as traits
Changing original classes/class hierarchy does not change the target classes which already contain included code
It is not possible to: Include the same instance variable from two separate traits into my class, unless both use an instance variable which already exists in my class.
Usage
Superclasssubclass:#SubclassNameinstanceVariableNames:'muh'"TraitClasses: include other (parts of) other classes"Includes: { #OtherClassselectors: {#selA . #hi} .
#AnotherClass .
#YANCvariables: {#muh useExisting. #bla . (#sel1->#sel2 useExisting)}
selectors: {#useMuh}
protocols: {#enumeration}.
}
classVariableNames:''poolDictionaries:''category:'Kernel-Models'