GNU bug report logs -
#45619
No warning when pcase-let is binding dynamic variable
Previous Next
Full log
View this message in rfc822 format
>> It's messier than that: the issue is that it doesn't bind variables
>> which aren't used lexically (this is needed to avoid spurious warnings
>> about unused vars when the var is used in on place but not in another).
> BTW, a similar issue (pitfall) I faced was that I sometimes expect that
> when a variable is already bound, already the first appearance of the
> symbol would be turned into an equality test.
Hmm... so-called "non-linear patterns". We should emit a warning when the
same var is used twice in a pattern, indeed, to avoid surprises.
We could also do as you describe but I'm not completely sure it's a good
idea (it begs questions about which equality test to use and when it
should be tested).
> I wonder if pcase variable bindings could be hygienic in the sense that
> they would use fresh symbols internally. That would maybe make the
> semantics clearer.
I don't know what you mean by that. Can you clarify?
Stefan
This bug report was last modified 3 years and 114 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.