Content deleted Content added
This part does not related with encapsulation at all. It could be moved to an article about Anti-patterns or another place but it should not be here. Tags: Reverted Visual edit |
Undid revision 1097723294 by 46.238.28.74 (talk) unsourced |
||
Line 1:
{{Short description|Bundling of data}}
In [[object-oriented programming]] (OOP), '''encapsulation''' refers to the bundling of data with the methods that operate on that data
This mechanism is not unique to OOP. Implementations of [[abstract data types]], e.g., [[module (programming)|modules]], offer a similar form of encapsulation. The similarity has been explained by programming language theorists in terms of [[existential types]].<ref>{{harvnb|Pierce|2002|loc=§ 24.2 Data Abstraction with Existentials}}</ref>
|