[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48219: 27.1.90; CL-LOOP facility fails with hash tables
From: |
Lars Ingebrigtsen |
Subject: |
bug#48219: 27.1.90; CL-LOOP facility fails with hash tables |
Date: |
Sun, 03 Jul 2022 14:18:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I think it's not because `database` is both a loop variables (i.e. one
> that iterates over elements of something else) and one of the something
> else over which we want to iterate. So the only meaningful
> interpretation I can see would be 2 nested loops, but the `loop` macro
> is designed to make a single loop, not nested loops.
Yes, I think it should be a single loop, and in that case, the
loop is meaningless.
> FWIW, I just tried it with `clisp` and it happpily expands it into
> a single loop which does something weird (it sets up up a hash-table
> iterator to operator over "the hash-table `database`" but at a time
> where the `database` variable has not yet been initialized (i.e. it's
> nil)).
So it signals an error in this case, too?
>> But since it's a meaningless loop, perhaps erroring out in the hash
>> table case is fine, too?
>
> I'm OK with erroring out if we can emit a meaning error message.
I think the current error message is OK, really...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no