From: Andrea Corallo <acorallo@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 71120@debbugs.gnu.org,
"Mattias Engdegård" <mattias.engdegard@gmail.com>,
"Philip Kaludercic" <philipk@posteo.net>,
"Philippe Schnoebelen" <phs@lmf.cnrs.fr>
Subject: bug#71120: 29.3; buglet in cl-loop
Date: Thu, 30 May 2024 11:41:50 -0400 [thread overview]
Message-ID: <yp1h6efqpc1.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <jwvzfs7we9r.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 30 May 2024 10:51:19 -0400")
Stefan Monnier <monnier@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
next prev parent reply other threads:[~2024-05-30 15:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 8:43 bug#71120: 29.3; buglet in cl-loop Philippe Schnoebelen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-29 20:47 ` Philip Kaludercic
2024-05-29 21:33 ` Andrea Corallo
2024-05-29 21:49 ` Andrea Corallo
2024-05-30 1:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-30 9:25 ` Mattias Engdegård
2024-05-30 13:14 ` Andrea Corallo
2024-05-30 14:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-30 15:41 ` Andrea Corallo [this message]
2024-05-30 15:45 ` Mattias Engdegård
2024-05-30 17:15 ` Andrea Corallo
2024-05-30 17:18 ` Mattias Engdegård
2024-05-30 17:42 ` Andrea Corallo
2024-05-31 4:30 ` Gerd Möllmann
2024-05-31 8:29 ` Mattias Engdegård
2024-06-03 15:24 ` Andrea Corallo
2024-06-03 15:32 ` Mattias Engdegård
2024-06-03 15:42 ` Andrea Corallo
2024-06-03 16:24 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yp1h6efqpc1.fsf@fencepost.gnu.org \
--to=acorallo@gnu.org \
--cc=71120@debbugs.gnu.org \
--cc=mattias.engdegard@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=philipk@posteo.net \
--cc=phs@lmf.cnrs.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).