bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#61730: 30.0.50; Compiler warnings for delq and delete


From: Michael Heerdegen
Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete
Date: Fri, 24 Feb 2023 17:45:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Even though my-list is never used again in the program?  How is this
> > better than "(setq _ ..."?
>
> This case is indeed a matter of personal style.
>
> If you modify some list and throw away the return value, the program is
> likely to refer to the place again, though, not necessarily in the same
> function.

Instead of "(setq _ ..." you could better use "(ignore ..." which would
also serve as a hint to the reader: "the return value is ignored
intentionally, this destructive operation is intended like it is in this
case".  That would not be bad style IMO.

Michael.





reply via email to

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