A Metaobject Protocol for C++
Abstract
This paper presents a metaobject protocol (MOP) for C . This MOP was designed to bring the power of meta-programming to C programmers. It avoids penalties on runtime performance by adopting a new meta-architecture in which the metaobjects control the compilation of programs instead of being active during program execution. This allows the MOP to be used to implement libraries of efficient, transparent language extensions. 1 Introduction A metaobject protocol (MOP) is an object-oriented interface for programmers to customize the behavior and implementation of programming languages and other system software. The usefulness of this kind of customizability has been argued elsewhere[11, 9, 10], and interesting MOPs have been included in languages such as Lisp[20], ABCL[21], and, to a lesser degree, Smalltalk[6]. The goal of our work is to bring the power of metaprogramming to the more mainstream language C , while respecting their performance concerns in that community. This paper pr...
DOI 10.1145/217838.217868