I really want to learn Scheme macros. I glanced over the content of "On Lisp" and a lot of the chapters have been devoted to Lisp macros. However I do not know common lisp. Can I use it to learn Scheme Macros?
Asked
Active
Viewed 1,133 times
4
-
2Greg is right, Common Lisp's macros are too different from Scheme's to learn the specifics from On Lisp. But the intent of the macros in On Lisp apply to any language with macros. It might still be worthwhile to read the macro chapters for ideas rather than specific code. – Nathan Shively-Sanders Jun 05 '09 at 13:59
2 Answers
10
Scheme macros ("hygienic macros") are completely different from traditional Lisp macros. Some implementations of Scheme offer Lisp macros in addition to Scheme macros, but this is not required by the Scheme standard.
I would recommend you look for instructional materials specific to Scheme macros if you would like to learn about that style of macro. Google shows many pages offering an introduction to Scheme macros.

Greg Hewgill
- 951,095
- 183
- 1,149
- 1,285
-
I dont know anything about macros. What i dont understand is: Are Lisp macros totally unusable in Scheme or Scheme Macros are just "better"? – unj2 Jun 05 '09 at 16:01
-
Scheme Macros are mostly better; higher level, if you will. I think you can build Scheme macros out of CL macros, but not the other way around. Scheme macros are much nicer to work with, as they won't capture variables on you. – Theo Belaire Dec 08 '10 at 22:15
5
Re: Nathan Sanders
On Lisp is definitely worth reading; you get a taste for a style of macros and some interesting solutions to problems. Also, you find can better understand the problem that hygienic macros solve.
I can't comment yet or I would have done so in line.

grettke
- 1,407
- 7
- 10