Subject: Re: Macros in Common Lisp, Scheme, and other languages From: Erik Naggum <firstname.lastname@example.org> Date: 07 Sep 2002 20:49:54 +0000 Newsgroups: comp.lang.lisp,comp.lang.scheme,comp.lang.functional Message-ID: <email@example.com> * Paul F. Dietz | This would work, but I see some problems. All of them implementation restrictions. If we wish to make macros better by augmenting them with environment information, that would require some work to improve existing compilers. If not even the work necessary to remove the implementation restrictions that you point out is sufficiently motivated by the improvements that we could clearly obtain at the far side of availability of better compilers, what would motivate the universal implementation of environment information for macros? Do you see the effort required to add environment information as significantly less than that required to fix the problems you have encountered in existing compilers? If so, on what have you based this assessment? I think the current language is strong enough to do what we want to do with Common Lisp, and that the macro system does not need improvement for any /semantic/ reasons. However, there is a difference in /convenience/ that might provide programmers with an impetus to change their ways when optimizing their code if they had macros that could significantly simplify the task for the compiler, and they could observe improvements in the compiled code. However, I can hardly imagine such improvements to be disconnected, so one who wanted to make type-sensitive improvements to Common Lisp code would want a compiler that could do it with the current language. As to the exponential growth, I do not understand the purpose of pointing out hard problems before we even know where to go with simpler ones. What matters is the conditions under which the solutions will scale well and under which it would not. I would not be very surprised to see n-ary functions fail to be optimizable with this scheme, but that should not deter us from making improvements that would mainly improve less complex functions. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.