> Date: Mon, 25 Mar 2013 07:35:51 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: schwab@linux-m68k.org, Emacs-devel@gnu.org
>AFAIR, it was once a negligible minority at best, so much so that I
> On 03/25/2013 01:20 AM, Eli Zaretskii wrote:
>
> > Out of fairness, you introduced this style into Emacs sources
>
> I've certainly used it in the changes I made, and as a result it's
> become more popular, but I did not introduce it. That style has
> been used in Emacs, as a minority style, for many years.
don't remember it being used. That was in the days that the only
style enforced in the Emacs sources was what the GNU Coding Standards
say, btw. That's what allowed "minority styles" in the first place.
I disagree; there's nothing unclear in a call to isnan, and the
> > If we want our code to be robust in the face of NaNs, we should
> > probably use 'isnan' explicitly
>
> That will slow the code down and make it harder to read.
slow-down is negligible, if it exists at all, and won't be noticed in
the context of Emacs, which doesn't pretend to be a fast
number-cruncher anyway.
Such comments would be even worse.
> Perhaps a
> comment could be introduced; but must we really add a comment
> "watch out for NaNs!" every time we have a floating point comparison?
But the problem with relying on 0 < foo is that most people won't even
consider the subtle difference between that and !(foo >= 0) when NaNs
are involved. Calling isnan makes that explicit.
Anyway, this issue is tangential to the style issue.