Sciweavers

ECOOP
2004
Springer

Composable Encapsulation Policies

13 years 10 months ago
Composable Encapsulation Policies
Given the importance of encapsulation to object-oriented programming, it is surprising to note that mainstream object-oriented languages offer only limited and fixed ways of encapsulating methods. Typically one may only address two categories of clients, users and heirs, and one must bind visibility and access rights at an early stage. This can lead to inflexible and fragile code as well as clumsy workarounds. We propose a simple and general solution to this problem in which encapsulation policies can be specified separately from implementations. As such they become composable entities that can be reused by different classes. We present a detailed analysis of the problem with encapsulation and visibility mechanisms in mainstream OO languages, we introduce our approach in terms of a simple model, and we evaluate how our approach compares with existing approaches. We also assess the impact of incorporating encapsulation policies into Smalltalk.
Nathanael Schärli, Stéphane Ducasse, O
Added 01 Jul 2010
Updated 01 Jul 2010
Type Conference
Year 2004
Where ECOOP
Authors Nathanael Schärli, Stéphane Ducasse, Oscar Nierstrasz, Roel Wuyts
Comments (0)