History
Macro processors became popular when programmers commonly used assembly language. In those early days of programming, programmers noted that much of their programs consisted of repeated text, and they invented simple means for reusing this text. Programmers soon discovered the advantages not only of reusing entire blocks of text, but also of substituting different values for similar parameters. This defined the usage range of macro processors.
Kernighan and Ritchie developed m4 in 1977, basing it on the ideas of Christopher Strachey. The distinguishing features of this style of macro preprocessing included:
- free-form syntax (not line-based like a typical macro preprocessor designed for assembly-language processing)
- the high degree of re-expansion (a macro's arguments get expanded twice: once during scanning and once at interpolation time)
The implementation of Rational Fortran used m4 as its macro engine from the beginning; and most Unix variants ship with it.
As of 2009 many applications continue to use m4 as part of the GNU Project's autoconf. It also appears in the configuration process of sendmail (a widespread mail transfer agent) and for generating footprints in the gEDA toolsuite.
m4 has many uses in code generation, but (as with any macro processor) problems can be hard to debug.
Read more about this topic: M4 (computer Language)
Famous quotes containing the word history:
“Anyone who is practically acquainted with scientific work is aware that those who refuse to go beyond fact rarely get as far as fact; and anyone who has studied the history of science knows that almost every great step therein has been made by the anticipation of Nature.”
—Thomas Henry Huxley (182595)
“Certainly there is not the fight recorded in Concord history, at least, if in the history of America, that will bear a moments comparison with this, whether for the numbers engaged in it, or for the patriotism and heroism displayed.”
—Henry David Thoreau (18171862)
“Let it suffice that in the light of these two facts, namely, that the mind is One, and that nature is its correlative, history is to be read and written.”
—Ralph Waldo Emerson (18031882)