Benjamin.Pierce@PROOF.ERGO.CS.CMU.EDU (05/15/89)
I'm interested in examples or applications that clearly demonstrate the utility of macros as a language extension mechanism. In particular, I'd like to know about useful macros with the following properties: 1) They make "significant" use of the macro definition mechanism (this is to rule out kinds of notational extensions that could be handled just as well by a simpler mechanism). 2) They cannot be implemented as functions (this rules out uses of macros to improve efficiency of programs without increasing the expressive power of the language). 3) They provide features or constructs that would NOT be a desirable addition to the base language (this rules out macros that "should" be language features rather than macros, e.g. delayed evaluation, polymorphic types, records, exceptions, ... [I know some of these are debatable!]). Pointers to previous discussions or research papers also gratefully accepted. Benli