![]() | This article has multiple issues. Please help
improve it or discuss these issues on the
talk page. (
Learn how and when to remove these template messages)
|
In computer programming, abstraction inversion is an anti-pattern arising when users of a construct need functions implemented within it but not exposed by its interface. The result is that the users re-implement the required functions in terms of the interface, which in its turn uses the internal implementation of the same functions. This may result in implementing lower-level features in terms of higher-level ones, thus the term 'abstraction inversion'.
Possible ill-effects are:
Alleged examples from professional programming circles include:
()
operator, but it is still often necessary to implement a new class, such as the
Functors in the STL. (
C++11's lambda function makes it much easier to create an object representing a function.)Examples that are common outside professional programming circles include:
![]() | This article has multiple issues. Please help
improve it or discuss these issues on the
talk page. (
Learn how and when to remove these template messages)
|
In computer programming, abstraction inversion is an anti-pattern arising when users of a construct need functions implemented within it but not exposed by its interface. The result is that the users re-implement the required functions in terms of the interface, which in its turn uses the internal implementation of the same functions. This may result in implementing lower-level features in terms of higher-level ones, thus the term 'abstraction inversion'.
Possible ill-effects are:
Alleged examples from professional programming circles include:
()
operator, but it is still often necessary to implement a new class, such as the
Functors in the STL. (
C++11's lambda function makes it much easier to create an object representing a function.)Examples that are common outside professional programming circles include: