emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Warn about comparing quoted lists (etc) using `eq`


From: Drew Adams
Subject: RE: [External] : Warn about comparing quoted lists (etc) using `eq`
Date: Wed, 14 Dec 2022 18:57:05 +0000

> I'm about to push a new byte-compiler warning that finds mistakes like
> 
>   (eq x '(ho hum))
> 
> Ie, attempts to compare, by identity, literals that may not match
> anything at all: quoted lists, strings, floats etc.

The warning could perhaps remind users of `equal'.

It's likely that in at least some cases what they
really meant was (equal x '(ho hum)).  And `equal'
takes care of all types (strings etc.).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]