From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Juan José García Ripoll" <juanjose.garcia.ripoll@csic.es>,
48219@debbugs.gnu.org
Subject: bug#48219: 27.1.90; CL-LOOP facility fails with hash tables
Date: Sat, 02 Jul 2022 13:24:36 +0200 [thread overview]
Message-ID: <87v8sf3ggb.fsf@gnus.org> (raw)
In-Reply-To: <jwv8rpdsziw.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 01 Jul 2022 10:03:17 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Yes, that does seem wrong.
>
> Agreed, but I don't know what the code is supposed to do when `database`
> is not-nil, so I can't even tell if the code is meaningful.
(cl-loop
for database in nil
for aux = (message "databse: %S" database)
for entry being the hash-values of database
do (message "FOO %S" database))
Hm... Oh, yeah -- that's not really a meaningful loop statement, is it?
But by analogue, this equally pointless loop returns nil:
(cl-loop
for database in '((1) (2))
for entry in database
collect entry)
So I guess the original loop should also do that.
But since it's a meaningless loop, perhaps erroring out in the hash
table case is fine, too?
>> I had a brief look at cl--parse-loop-clause, but this is code
>> I haven't looked at before, and I'm not sure I understand the control
>> flow here. Adding Stefan to the CCs; I'm sure he can tell what should
>> be done immediately. 😀
>
> Well, it's fairly obvious: we should just fix the problem.
> Next!
Whew! That was simple!
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2022-07-02 11:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 8:46 bug#48219: 27.1.90; CL-LOOP facility fails with hash tables Juan José García Ripoll
2022-07-01 12:03 ` Lars Ingebrigtsen
2022-07-01 14:03 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-02 11:24 ` Lars Ingebrigtsen [this message]
2022-07-02 20:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-03 12:18 ` Lars Ingebrigtsen
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=87v8sf3ggb.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=48219@debbugs.gnu.org \
--cc=juanjose.garcia.ripoll@csic.es \
--cc=monnier@iro.umontreal.ca \
/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).