[Top][All Lists]

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

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

From: Paul Eggert
Subject: Re: (0 <= i && i < N) is not "backwards"
Date: Mon, 25 Mar 2013 07:35:51 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

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.

> 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.  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?

> whether a NaN
> should be considered greater or less than zero in the Emacs context is
> debatable

The documentation for one of the affected variables says
"If the value is not a number, ...", so the behavior formerly matched
the documentation and now no longer does so.

This was not the only bug introduced by the change, I'm afraid.

reply via email to

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