Subject: Re: Newby question - Hygenic macros vs. other kinds
From: Erik Naggum <>
Date: 1998/05/18
Newsgroups: comp.lang.lisp
Message-ID: <>

* Martin B. Pomije
| I'm teaching myself CL and Scheme.  I was reading the Scheme language
| definition (Revised^4 Report on the Algorithmic Language Scheme) when I
| came across the phrase "hygenic macro", somehow implying that CL is
| "unclean" in this regard.  What makes makes Scheme macros such pure
| things?

  Barry Margolin has answered with the reasons why you need it, but Kent
  Pitman posted an article some time ago (1998-03-20) that shed light on
  why this is a serious problem in Scheme and no big deal in Common Lisp.
  it's message-id is <>¹ in reply to my
  question in <>².  (you should be able to find
  them on Dejanews or other USENET search engines, too.)

  in brief, Scheme has only one namespace, and the first element of an
  s-expression is evaluated to obtain the function to call or the special
  form.  this means you run into a serious danger of using _functions_ that
  have their meanings changed by the body of code into which the macro
  expansion is "inserted".  clearly, this is bad, but it's a design choice
  in Scheme with many qualities, so they had to find a way to deal with it.
  the way I see it (after reading and appreciating Kent's article) is that
  Scheme allows a level of pollution that is unhealthy and then they need a
  way to clean up, or things get "unhygienic" around them.  Common Lisp is
  hygienic _enough_ on its own since it doesn't pollute its namespaces to
  begin with, and therefore need a simpler mechanism for variable capture.

¹ (http/ftp)
² (http/ftp)
  "Where do you want to go to jail today?"
			-- U.S. Justice Department's Windows 98 slogan