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

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

Re: How to avoid compiler warning `unused lexical variable' for `dolist'


From: Emanuel Berg
Subject: Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?
Date: Fri, 08 Jan 2021 03:21:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier wrote:

> It's hidden because it's not at the usual place where the
> return value is usually placed (i.e. in the last
> expression).
>
> There are several other macros/specialforms that also place
> the return value elsewhere than the last expression, such as
> `unwind-protect`, (and to a lesser extent `if`, `cond`,
> `condition-case`, `prog1`), but these still place the return
> value in one of the immediate subexpressions, many of them
> use indentation to try and make the return value "stand out"
> from the rest, etc...
>
> In contrast in `dotimes` and `dolist` it's placed in
> a sub-sub-expression and moreover it's one that's rarely
> used (arguably *because* it's too deeply nested), so you're
> likely to miss it if you don't go looking for it
> very actively.
>
> Not that it matters anyway,

It matters in the sense I just enjoyed reading that.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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