INTRODUCING VIRTUAL INSTANCE VARIABLES IN CLASSES TO PROVIDE SUFFICIENT SUPPORT FOR ENCAPSULATION

Authors
Citation
Xd. Li et Gl. Zheng, INTRODUCING VIRTUAL INSTANCE VARIABLES IN CLASSES TO PROVIDE SUFFICIENT SUPPORT FOR ENCAPSULATION, ACM SIGPLAN NOTICES, 30(7), 1995, pp. 52-56
Citations number
8
Categorie Soggetti
Computer Sciences","Computer Science Software Graphycs Programming
Journal title
Volume
30
Issue
7
Year of publication
1995
Pages
52 - 56
Database
ISI
SICI code
Abstract
Encapsulation is a technique for minimizing interdependecies among sep arately-writen modules by defining strict external interfaces. Many po pular object-oriented languages (e.g, Smalltalk, Flavors, Objective-C and Eiffel) allow free access to inherited instances variables by desc endant classes, thus denying the designer the freedom to compatibly ch ange the representation of a class without affecting clients and sever ly compromising encapsulation. In this paper, by introducing virtual i nstance variables and providing two interfaces (client-interface and s ubclass-interface) for a class, we give a class mechanism which provid es sufficent support for encapsulation and is implemented in NDOOM, a object-oriented dialect of Modula-2 which we are developing.