Subject: Re: Why is Scheme not a Lisp? From: Erik Naggum <firstname.lastname@example.org> Date: Fri, 15 Mar 2002 06:12:05 GMT Newsgroups: comp.lang.lisp Message-ID: <email@example.com> * Kent M Pitman > Hygenic macros solve a problem that CL does not have. > (They solve a problem introduced by Lisp1-ness. Heh.) > I see no need for these whatsoever. * Thomas Bushnell, BSG | Hrm, maybe this is true, but I'm not sure about it. There is a root | problem that I think CL still has, but maybe not. Requires more thought | before I'd be confident either way. (And another close read of Chris | Hansen's paper.) But maybe you could say why you think the problem | exists in Scheme but not CL? Briefly put, the single namespace means that any variables used by the macro would cause any user-defined functions with the same name to become unusable in the body of the macro. This requires a solution, and the solution is both real symbols, packages, and two namespaces, but in Scheme, they held on to the single namespace and had to invent hygienic macros, instead. In Common Lisp, there is no danger of trampling on the functional value of a symbol just because you bind it lexically as a variable, so the body of the macro is undisturbed by any overlap in usage. Also, since we have the ability to generate a symbol that cannot be reached by any name by the reader -- it is not interned in any package -- using either make-symbol or gensym, we have a choice of exporting a variable (or even function) from the macro to the body or to hide it with an invisible symbol. Using such generated symbols poses no worse problems for any competent programmer than writing hygienic macros. There are even macros around that "rebind" variables hygienically. Thus hygienic macros is a necessary solution to a problem that arose from several bad design decisions in Scheme that plague the language in more ways than just requiring hygienic macros -- at least as seen from Common Lisp. The single namespace, the lack of first-class symbols, exacerbated by the lack of packages, and the need for make-shift solutions to what should not have been problems, are all among the things that will continue to create problems. Scheme therefore has to return to the drawing board and redesign itself instead of dragging this bggage along into the future. At least it should try again with first-class symbols and packages. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.