From: Edward Faulkner Date: 2005-09-27T22:54:48+09:00 Subject: Re: Fwd: Lisp macros --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 27, 2005 at 09:21:07PM +0900, Devin Mullins wrote: > Crappy example... >=20 > Help! Is there a Lisper in the house? Part of the attraction of Lisp macros is that they allow you to keep the core language very small, and add the features you want with macros. For example, as long as you have the lambda operator, you can define things like "while" and "let" as macros, not keywords. This is in fact how many Lisp implementations work, because it keeps the compiler/interpreter simple. Another use for macros is to perform some of your computation at compile time, saving you from ever needing to perform it again at runtime. In the general case, macros can be used to rewrite whole programs. For example, even though Lisp doesn't natively support continuations, you can build them with macros that rewrite your program into an explicit continuation-passing style. Paul Graham's "On Lisp" is available online and contains several chapters about macros. It gives many more examples: http://www.paulgraham.com/onlisptext.html regards, Ed --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDOU7dnhUz11p9MSARAkxhAJ9zPK/cr3StUlOZLch/WpSNAmxe9wCguakQ 3XjcAaXqx/ib7zoxEhBskxA= =7KNW -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--