From: gabriele renzi Date: 2005-09-28T08:41:43+09:00 Subject: Re: Fwd: Lisp macros Edward Faulkner ha scritto: > On Tue, Sep 27, 2005 at 09:21:07PM +0900, Devin Mullins wrote: > >>Crappy example... >> >>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. I may recall wrongly, but my I remember that - once you have lambda forms and macros you can write everything - Common Lisp, which is what I think people think of when writing "lisp", still has something like X special forms (with X>20) > Paul Graham's "On Lisp" is available online and contains several > chapters about macros. It gives many more examples: I think another nice text available online for lisp noobs (like me) is "Practical Common Lisp". It is not a whole macro cookbook like Graham's text, but it shows how macros are really a simple concept that can be applied to simple abstractions, that stacked on over another result in much smaller and cleaner code