[plt-scheme] Macros in other programming languages?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Jun 27 08:03:21 EDT 2007

Nah, no lynching around here. We qualify our strong statements.

The word macro has been in use since the 1950s at least, according to  
Eugene's excellent historical chapter in his dissertation. (Where are  
these chapters nowadays?)

Macro in assembly languages. Macros as string preprocessors in a  
number of languages, including C (which is not a first and not a  
last). Macros as S-expressions. Macros as an interface to  
compilation, with partially obvious temporary properties. (Eh, you  
want it when?) Macros as combinators for parser extensions. And I am  
probably overlooking a few practical cases, not to speak of  
theoretical non-starters (I know of at least one).

-- Matthias

On Jun 27, 2007, at 7:24 AM, Ivanyi Peter wrote:

> Shriram Krishnamurthi <sk at cs.brown.edu> írta:
>> None provide anything remotely similar to PLT Scheme's
> macro system.
>> (That's why all these macro-using folks are using PLT Scheme!)
> Fully agreed. However I would like to make a comment, for
> which I may
> be stoned to death. :-)
> (Anyway, I am looking at things from the point of view of a
> practitioner
> and not always a theoretician(?).)
> I have used and use C heavily and C have a "macro" system.
> The ANSI
> C version of the macro system is dead simple, however if you
> use the
> GNU extensions in gcc you can do some very nifty things. (I
> am not sure,
> but maybe the latest ANSI standard for C made some
> modifications for
> macros as well, but gcc definitely did.) On the other hand
> if you write
> functions with macros in C and there is a problem you are
> stuck and you
> have to get back to plain old functions.
> In conclusion "None provide anything remotely similar to"
> Scheme or Lisp. (For which statement I may be killed for a
> second time on this
> list. :-) )
> Best regards,
> Peter Ivanyi
> Névreszóló takarók - kíváló ajándék születésre, szülinapra, névnapra.
> http://www.takoo.hu
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.