Flexible Object Representation using Properties


Many object-oriented programming languages use fields to represent object state. But subclasses cannot alter the representation of an object sufficiently. Because of that, a number of subclassing problems are difficult or impossible to deal with if the superclasses were not designed to anticipate them, especially under multiple inheritance. Moreover, in languages such as Java and C#, encapsulation necessitates a lot of boilerplate code. In this paper, we improve the C# concept of properties, making them more flexible for use with inheritance and reducing their boilerplate code. Using our properties makes it easier for programmers to model programs in a more consistent manner. Furthermore, our Properties allow redefining an object’s attributes in ways that equal the possibilities for redefinition of virtual methods in many programming languages, which makes them better suited to deal with unanticipated reuse. Specifically, using our construct, it becomes possible to join several superclass attributes into only one at the subclass level, conjointly decreasing memory consumption.

1 Figure or Table

Cite this paper

@inproceedings{Vanderkimpen2007FlexibleOR, title={Flexible Object Representation using Properties}, author={Koen Vanderkimpen and Marko van Dooren and Eric Steegmans}, year={2007} }