GNU bug report logs -
#71120
29.3; buglet in cl-loop
Previous Next
Reported by: Philippe Schnoebelen <phs <at> lmf.cnrs.fr>
Date: Wed, 22 May 2024 14:49:02 UTC
Severity: normal
Found in version 29.3
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 71120 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>>> (cl-loop for i from 1 to 100 collect (random 6))
> [...]
>>>> (cl-loop for _i from 1 to 100 collect (random 6))
>>> Thus I don't think there's anything we really need to do here, do you?
>> I, for one, think the nicest option is the one SBCL (and I guess other
>> CL implementations) are using, that is to have 'i' 'ignorable', the
>> problem is that we don't support this at language level.
>
> I don't quite see how "ignorable" comes into play here.
>
> In the first case above, the var is "not used", has a "normal"
> name, and we get no warning. Does SBCL do the same or does it emit
> a warning?
It does not emit a warning
> In the second case, the var is "not used", has an "I'm not used" name,
> and we do get a warning. Does SBCL even support "I'm not used" names?
It does not.
In Elisp a variable can be either normal or _* (not used).
In CL a variable other than normal can be 'ignore' which correspond to
our _* or 'ignorable'. This last AFAIU stands for might or might not be
used but don't emit warnings.
It's no big deal but I think 'ignorable' is useful for macros expanding
code with variables that might or not be used by the user like in this.
Andrea
This bug report was last modified 79 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.