Macro Processing in Object-Oriented Languages

Shigeru Chiba. Macro Processing in Object-Oriented Languages. In Christine Mingins, Bertrand Meyer, editors, TOOLS 1998: 28th International Conference on Technology of Object-Oriented Languages and Systems, 23-26 November 1998, Melbourne, Australia. pages 113-126, IEEE Computer Society, 1998. [doi]

Abstract

There are a number of programmable macro systems such as Lisp’s. While they can handle complex program transformation, they still have difficulty in handling some kinds of transformation typical in object-oriented programming. This paper examines this problem and, to address it, presents an advanced macro system based on ideas borrowed from reflection. Unlike other macro systems, our macro system provides metaobjects as the data structure used for the macro processing instead of an abstract syntax tree. This feature makes it easy to implement a range of transformations of object-oriented programs.