Subject: Re: Tail recursion elimination in methods From: Erik Naggum <email@example.com> Date: Mon, 12 Nov 2001 03:39:19 GMT Newsgroups: comp.lang.lisp Message-ID: <firstname.lastname@example.org> * Software Scavenger | The following behavior in Lispworks 4.1.20 doesn't make sense, because | Lispworks eliminates tail recursion in ordinary functions when compiled. If it allows advice to functions the same way it allows :around, :before, and :after methods, it is hard to do it for functions, too. Predicting what a programmer will do is hard. Disallowing certain things because of a high optimization level is not a good idea, because it would mean that dynamism and production quality would not be possible at the same time, and that is sometimes precisely what you want. | And why does it say the method is already compiled? Well, it does not say that. You asked for the symbol to be compiled, and the symbol's function value is the generic function, so it said that the generic function is already compiled. That is because you did not define your own generic function (with defgeneric); you let defmethod use one of its already defined and compiled generic functions for you in the absence of an existing generic function. /// -- Norway is now run by a priest from the fundamentalist Christian People's Party, the fifth largest party representing one eighth of the electorate. -- Carrying a Swiss Army pocket knife in Oslo, Norway, is a criminal offense.