DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

BenevolentDictatorForLife > SICP > XAML > EeePC > Holon > RegEx > RegularExpressions > Opera > Scrum > Rsync > Emacs > MySQL > Stack > Heap > Agile > AgileSoftwareEngineering > MixInClear Trail
Main /

Mix In

Lisp
Python
Ruby

StrategyPattern?

Mutliple inheritance is mostly distinct from mix-ins in that it is resolved at call-time, where mix-ins are resolved at class-definition-time. [1]


In object-oriented programming languages, a mixin is a class that provides a certain functionality to be inherited by a subclass, but is not meant to stand alone. Inheriting from a mixin is not a form of specialization but is rather a means to collect functionality.[...]

A mixin can also be viewed as an an interface with implemented methods. When a class includes a mixin, the class implements the interface and includes, not inherits, all the mixin's attributes and methods. They become part of the class during compilation.[2]


MixIn programming is a style of software development where units of functionality are created in a class and then mixed in with other classes.

A mixin class is a parent class that is inherited from - but not as a means of specialization. Typically, the mixin will export services to a child class, but no semantics will be implied about the child "being a kind of" the parent.

A MixIn is also called an AbstractSubclass since MixIn can provide other services based on the services the original class provides.[3]



Mixins are classes that are parameterized by their parent class. They can also be thought of as functions mapping classes to new subclasses. Mixins can be instantiated with different parent classes depending on the requirements of a particular context. [4]



MixIn is sort of StrategyPattern? in inheritance...!?



Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 24.09.2008 22:46 Uhr und seit 7. April 2005 1171 aufgerufen.