It was forty years ago today

Actually, it was in 1960, four years before the Beatles showed up on Ed Sullivan, that Doug McIlroy published Macro instruction extensions of compiler languages, which appears to be a seminal paper in the literature of metaprogramming. I mention this because a number of folks have responded to last week's item, Programs that write programs, pointing out that Lisp programmers have been there, done that:

"your note about code generation, and the referenced discussions - bits of which i'd already read elsewhere, left me with a really eerie feeling, that i might not be living in the same dimension with you folks. you see, there's a practice of code generation which extends back decades: lisp. code generations is a lisp programmer's bread and butter."
"In the lisp world, they call these macros. The idea is pretty widely known, though not too many languages implement them. Perl 6, and by extension the Parrot interpreter, will include macros, and they will thus be available to any language that gets implemented on top of Parrot (which currently includes Ruby, Python, (maybe) PHP, and, of course, Perl)."

Points taken. As it happens, I did at one time program in a variant of Lisp. From that experience I learned the value of incremental development, dynamic data structures (lists, dictionaries), code generation, and other techniques that later became available to me in languages like Perl and Python. But macros weren't part of the Lisp I used, so I didn't make that connection.

The cultural anthropology of programming languages is a fascinating subject. Recently, for example, I asked an accomplished developer with deep roots in the Microsoft programming culture to cite his favorite productivity aids in the .NET Framework. Regular expressions made his short list. That floored me, since regexes are just part of the atmosphere that Unix and open source programmers have always breathed. But a lot of Microsoft programmers didn't grow up breathing that atmosphere.

Of course it goes both ways. I'm likely to try out new technologies on Windows first, because the Windows culture groks packaging and installation -- even of open source software! -- better than the Unix culture does.

There's some truth to the oft-heard claim that there are no new software technologies. If we spent the next decade just cross-fertilizing what we already have, it would probably be a decade well spent.

Former URL: