UDC 004.434

Using Customizable Properties to make Object Representation a First-class Citizen

Koen Vanderkimpen1, Marko van Dooren1 and Eric Steegmans1

  1. Department of Computer Science, Katholieke Universiteit Leuven
    Celestijnenlaan 300A, 3000 Leuven, Belgium
    {koen.vanderkimpen, marko.vandooren, eric.steegmans}@cs.kuleuven.be

Abstract

Many object-oriented programming languages use fields to represent object state. This representation however, cannot be altered sufficiently when subclassing. Moreover, in languages such as Java and C#, proper encapsulation of fields necessitates a lot of boilerplate code. In this paper, we introduce our concept of properties, which are far more flexible for use with inheritance and greatly reduce boilerplate code compared to C# properties. 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.

Publication information

Volume 4, Issue 2 (December 2007)
Advances in Programming Languages
Year of Publication: 2007
ISSN: 1820-0214 (Print) 2406-1018 (Online)
Publisher: ComSIS Consortium

Full text

DownloadAvailable in PDF
Portable Document Format

How to cite

Vanderkimpen, K., Dooren, M. v., Steegmans, E.: Using Customizable Properties to make Object Representation a First-class Citizen. Computer Science and Information Systems, Vol. 4, No. 2, 27-46. (2007)