Doug can certainly give you more information, but very early in my
career at Bell Labs I saw an internal memo, by (I think) Doug and Bob
Morris, that had a taxonomy of macro systems based on a set of
decisions (things like can you define a macro inside a macro, rescan
expanded macros looking for macro definitions and uses, etc.) I
seem to recall there were close to a thousand different macro systems
possible. It was a brilliant paper, but I don't think it was ever
published. The Assembler for the IBM 7094 had an amazing macro
facility -- I recall that someone wrote a Lisp compiler entirely in
macros, and it would regularly recurse several hundred levels deep
while generating code. Someone told me once that Bob Morris invented
macros -- I can't vouch for this. Doug?
Steve
----- Original Message -----
From: "Arnold Robbins" <arnold(a)skeeve.com>
To:<tuhs@tuhs.org>
Cc:
Sent:Mon, 11 Nov 2019 23:10:26 +0200
Subject:[TUHS] History of m6?
Hi.
Doug McIlroy is probably the best person to answer this.
Looking at the V3 and V4 manuals, there is a reference to the m6
macro
processor. The man page thereof refers to
A. D. Hall, The M6 Macroprocessor, Bell Telephone Laboratories, 1969
1. Is this memo available, even in hardcopy that could be scanned?
2. What's the history of m6, was it written in assembler? C?
3. When and why was it replaced with m4 (written by DMR IIRC)?
More generally, what's the history of m6 prior to Unix?
IIRC, the macro processor in Software Tools was inspired by m4,
and in particular its immediate evaluation of its arguments during
definition.
I guess I'll also ask, how widespread was the use of macro processors
in high level languages? They were big for assembler, and PL/1 had
a macro language, but I don't know of any other contemporary
languages
that had them. Were the general purpose macro processors used a lot?
E.g. with Fortran or Cobol or ...
I'm just curious. :-)
Thanks,
Arnold