home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.lisp
- Subject: Re: macro question
- Date: 7 Jan 1993 17:56:01 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 23
- Message-ID: <1ihqrhINNg65@early-bird.think.com>
- References: <CONVERSE.93Jan5225205@sloth.uchicago.edu> <DAVIS.93Jan6102702@passy.ilog.fr> <CONVERSE.93Jan7001530@sloth.uchicago.edu>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <CONVERSE.93Jan7001530@sloth.uchicago.edu> converse@cs.uchicago.edu (timoshenko) writes:
- > Sure, you're right that DEFCLASS and DEFSTRUCT and the like
- >have the useful side-effect of defining new functions, but those have
- >the advantage that they are part of the language already.
-
- Once upon a time they weren't part of the language. If programmers had
- avoided writing macros that define new functions, they never would have
- been written, and then they never would have become popular enough to be
- included in the standard language. Lisp's powerful macro capability is
- what has enabled it to evolve so well over the years; new definition and
- control structures can be added as easily as procedures can.
-
- Function-defining macros are a well-known, useful technique for procedural
- abstraction. It allows you to write a single macro that incorporates the
- structural elements common to a class of functions that should be defined;
- the macro in the original post was obviously contrived and didn't
- demonstrate this utility.
-
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-