Uniform and Safe Metaclass Composition

Ducasse, Stéphane; Schärli, Nathanael; Wuyts, Roel (2005). Uniform and Safe Metaclass Composition. Computer languages, systems & structures, 31(3-4), pp. 143-164. Elsevier 10.1016/j.cl.2004.11.003

[img] Text
1-s2.0-S1477842405000047-main.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (281kB)

In pure object-oriented languages, classes are objects, instances of other classes called metaclasses. In the same way as classes define the properties of their instances, metaclasses define the properties of classes. It is therefore very natural to wish to reuse class properties, utilizing them amongst several classes. However this introduced metaclass composition problems, i.e., code fragments applied to one class may break when used on another class due to the inheritance relationship between their respective metaclasses. Numerous approaches have tried to solve metaclass composition problems, but they always resort to an ad-hoc manner of handling conflicting properties, alienating the meta-programmer. We propose a uniform approach that represents class properties as traits, groups of methods that act as a unit of reuse from which classes are composed. Like all the other classes in the system, metaclasses are composed out of traits. This solution supports the reuse of class properties, and their safe and automatic composition based on explicit conflict resolution. The paper discusses traits and our solution, shows concrete examples implemented in the Smalltalk environment Squeak, and compares our approach with existing models for composing class properties.

Item Type:

Journal Article (Original Article)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG) [discontinued]

UniBE Contributor:

Ducasse, Stephane

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

ISSN:

1477-8424

Publisher:

Elsevier

Language:

English

Submitter:

Anja Ebeling

Date Deposited:

18 Oct 2017 12:20

Last Modified:

11 Apr 2024 16:11

Publisher DOI:

10.1016/j.cl.2004.11.003

BORIS DOI:

10.7892/boris.104502

URI:

https://boris.unibe.ch/id/eprint/104502

Actions (login required)

Edit item Edit item
Provide Feedback