[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36139: [PATCH] Make better use of the switch op in cond forms
From: |
Stefan Monnier |
Subject: |
bug#36139: [PATCH] Make better use of the switch op in cond forms |
Date: |
Tue, 18 Jun 2019 14:56:44 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Allow switch generation with a mixture of eq, eql, equal, memq, memql and
> member.
AFAIK all of those give the same result (in practice) as using
equal/member: I'm having a hard time imagining an eq/eql/memq/memql test
against a constant which behaves differently from equal/member except
for those that can simply always return nil (e.g. (eq x "toto") can
always return nil since there's no way the caller of this code can make
sure x is really the same string object as the "toto" generated by the
compiler).
So I think we should "standardize" on equal/member and mostly disregard
the eq/eql/equal difference (except maybe for emitting a warning when
comparing against something where `equal` doesn't give the same result).
Stefan
bug#36139: [PATCH] Make better use of the switch op in cond forms, Stefan Monnier, 2019/06/18
bug#36139: [PATCH] Make better use of the switch op in cond forms,
Stefan Monnier <=
bug#36139: [PATCH] Make better use of the switch op in cond forms, Stefan Monnier, 2019/06/18
bug#36139: [PATCH] Make better use of the switch op in cond forms, Stefan Monnier, 2019/06/18
bug#36139: [PATCH] Make better use of the switch op in cond forms, Stefan Monnier, 2019/06/18