Path: utzoo!utgpu!watserv1!watmath!att!cbnewsc!lgm From: lgm@cbnewsc.att.com (lawrence.g.mayka) Newsgroups: comp.lang.lisp Subject: Re: Virtues of Lisp syntax (a tangent on macros and Scheme) Summary: Macros perform compile-time manipulation "behind the scenes" Message-ID: <1990Sep20.234752.19591@cbnewsc.att.com> Date: 20 Sep 90 23:47:52 GMT References: <10466@life.ai.mit.edu> <6217@castle.ed.ac.uk> <10722@life.ai.mit.edu> <1990Sep20.170311@ai.mit.edu> Organization: AT&T Bell Laboratories Lines: 26 In article <1990Sep20.170311@ai.mit.edu>, tmb@ai.mit.edu (Thomas M. Breuel) writes: > * In a language like Scheme (as opposed to CommonLisp) > that provides efficient implementations of higher order > constructs with natural syntax, there is little need or > excuse for something as horrible as LOOP in the first > place. We can talk about Dick Waters' SERIES package instead, if you prefer. Though functional rather than iterative in style, the SERIES package still makes heavy use of macros. Why? To perform source code rearrangement during compilation, especially the unraveling of series expressions into iteration to improve performance. In general, I see the primary purpose of macros not as simple syntactic sugar but as a means of manipulating source code "surreptitiously" at compile time for reasons of efficiency improvement, tool applicability (e.g., recording the source file of a function definition so that Meta-. can find it on request), existence in the compilation environment (e.g., DEFPACKAGE), etc. Lawrence G. Mayka AT&T Bell Laboratories lgm@iexist.att.com Standard disclaimer.