Lecture Notes in Computer Science, 1996, Volume 1049/1996, 38-55, DOI: 10.1007/3-540-60954-7_42

Explicit metaclasses as a tool for improving the design of class libraries

Thomas Ledoux and Pierre Cointe

View Related Documents

Abstract

Existing OO methodologies focus on instance behaviors and reduce the role of a class to object creation. In fact, these methodologies do not address the issue of class design itself.
Nevertheless, classes have their own properties, which are not related to the semantics of their instances. Examples of such properties are well-known and language independent: concrete vs abstract classes, single instance vs multiple instances, single superclass vs multiple superclasses... Some other examples are less known and more language dependent: named vs indexed instance variables, persistent vs non persistent, local vs remote...
This paper introduces a set of class properties in the context of Classtalk, a metaobject protocol for Smalltalk. It explicitly expresses these properties at the level of metaclasses, and gives a first taxonomy so as to better understand them. Then, it takes advantage of these explicit metaclasses to re-engineer some well-known Smalltalk class hierarchies. Such re-engineered examples give us the opportunity to raise the problem of metaclasses composition. They justify the use of explicit metaclasses to improve the design of class libraries.

Keywords  class properties - explicit metaclasses - Smalltalk, Classtalk - language design - reuse - software engineering - CASE tools - patterns

Fulltext Preview

Image of the first page of the fulltext document