emacs-devel
[Top][All Lists]
Advanced

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

(0 <= i && i < N) is not "backwards"


From: Paul Eggert
Subject: (0 <= i && i < N) is not "backwards"
Date: Sun, 24 Mar 2013 16:14:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

Emacs trunk bzr 112126, installed with the commit log
"Reorder conditions that are written backwards",
changed a lot of Emacs code, typically to replace expressions
like "0 < i" with expressions like "i > 0".

This sort of stylistic change shouldn't be introduced without
discussion.  I often prefer "<", as it causes textual
order to reflect numeric order.  This is not just a personal
preference; it's a common style used in other GNU projects.
Removing this style en masse is not called for, particularly
in places where the code is checking for values in range.

In one or two places the change may have introduced a bug,
as "! (0 < X)" is not equivalent to "X <= 0" when
X is floating point, because of NaNs.

I suggest reverting the change and discussing it before
applying.



reply via email to

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