gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] 3.1.32: -Wshadow fixes in reading.c


From: Gunnar Farneback
Subject: Re: [gnugo-devel] 3.1.32: -Wshadow fixes in reading.c
Date: Mon, 15 Apr 2002 08:49:37 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Teun wrote:
> This patch fixes shadowing warnings in reading.c.
> The {ADD,REMOVE}_CANDIDATE_MOVE macros used k and l
> that are commonly used in the invoking functions as well.
> 
> These are not errors of cause, but I think readability
> of the code improves when a variable name has a unique
> meaning in a function.

Of course uniqueness is good, but it's not worth the price if the
alternative is harder to read variables. The proposed five letter loop
variables in the *_CANDIDATE_MOVE macros make the code much harder to
read than a little shadowing does.

/Gunnar



reply via email to

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