Joshua TAYLOR | 1 Apr 2010 17:39
Picon
Favicon

Re: unexpectedly "assumed special" warnings


On Thu, Apr 1, 2010 at 9:50 AM, Martin Simmons <martin <at> lispworks.com> wrote:
>>>>>> On Wed, 31 Mar 2010 11:16:08 -0400, Joshua TAYLOR said:
>>                              I was under the impression that
>>
>> (let ((x 0))
>>   (defun foo (n)
>>     (list n (incf x n))))
>>
>> has the effect that the (defun foo …) is no longer top-level.  Has
>> this no important side-effects?
>
> That's true.  There are a couple of side effects:
>
> 1) If you call foo in the same file, then compile-file will warn about it
>   being undefined.
>
> 2) The IDE will not be able to find the source code of foo from the name.
>   OTOH, you already have that problem with definterner, where it can be fixed
>   by using something like the dspec:def macro to give it a top-level dspec.

I see, thanks!  The IDE not finding the source (without some help) is
OK, especially since, as you say, this happens in either case.  The
warnings about the undefined functions bother me enough though that I
think I'll stay with the uninterned defparameter (and special
declaration).  Thanks everyone for input!  //JT
--

-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/


Gmane