6

On my way to learn Lisp I have discovered the all powerful and feared so called Macros, then after spending a hard time trying to understand them and their usefulness I said to myself, I FINALLY GOT IT.
I couldn't be more wrong, I was thinking that the only purpose of Macros was to define new control structures and that was all I needed to know until I start reading more and more on the subject and a whole new world has comes to me !

One can use Macros for new Domain Specific Language, Code Transformation and to avoid Boilerplate Code.

Hence, if a few examples at which the aforementioned usages of macros and others as well, with a concise and simple-to-understand explanation could be given it would be really nice.

gnat
20.5k29 gold badges117 silver badges308 bronze badges
asked Jul 22, 2012 at 10:41

1 Answer 1

4

The canonical reference for LISP macros is On Lisp: Advanced Techniques for Common Lisp, by Paul Graham (book version). It is out of print, and everyone who owns a copy knows what it is worth. You can download it, but Paul says nine figures got lost somewhere in the ozone.

Let Over Lambda, by Doug Hoyte, is also good.

answered Jul 22, 2012 at 11:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.