A study of a Compile-time Metaobject Protocol
Shigeru Chiba · Institutional Repositories DataBase (IRDB) · 1996
C++ cannot be used to implement control/data abstractions as a library if their implementations require specialized code for each user code. This problem limits programmers to write libraries in two ways: it makes some kinds of useful abstractions that inherently require such facilities impossible to implement, and it makes other abstractions difficult to implement efficiently. The OpenC++ MOP addresses this problem by providing libraries the ability to pre-process a program in a context-sensitive and non-local way. That is, libraries can instantiate specialized code depending on how the library is used and, if needed, substitute it for the original user code. The basic protocol structure of the OpenC++ MOP is based on that of the CLOS MOP, but the OpenC++ MOP runs metaobjects only at compile time. This means that the OpenC++ MOP does not imply runtime penalties caused by dispatching to metaobjects. ii Biographical Sketch Shigeru Chiba was born in Tokyo, Japan, in 1968. After livin...