all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
       [not found] <E1UJknW-0004ja-JF@vcs.savannah.gnu.org>
@ 2013-03-25 14:06 ` Stefan Monnier
  2013-03-25 14:32   ` Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-03-25 14:06 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

>   Reorder conditions that are written backwards
  
Backwards according to what?


        Stefan



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
  2013-03-25 14:06 ` Stefan Monnier
@ 2013-03-25 14:32   ` Andreas Schwab
  2013-03-26 14:21     ` Ted Zlatanov
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2013-03-25 14:32 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Backwards according to what?

According to common sense.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
@ 2013-03-25 15:38 René Kyllingstad
  2013-03-25 15:49 ` Eli Zaretskii
  2013-03-26 13:56 ` James Cloos
  0 siblings, 2 replies; 7+ messages in thread
From: René Kyllingstad @ 2013-03-25 15:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Andreas Schwab, Emacs Dev [emacs-devel]

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

On 25 March 2013 15:06, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> >   Reorder conditions that are written backwards
>
> Backwards according to what?


If you were explaining it to someone, which would you say:

     If i is greater than zero and less than N

or

     If zero is less than i, and i is less than N


-- René

[-- Attachment #2: Type: text/html, Size: 848 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
  2013-03-25 15:38 [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards René Kyllingstad
@ 2013-03-25 15:49 ` Eli Zaretskii
  2013-03-25 16:30   ` Paul Eggert
  2013-03-26 13:56 ` James Cloos
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2013-03-25 15:49 UTC (permalink / raw)
  To: René Kyllingstad; +Cc: schwab, monnier, emacs-devel

> From: René Kyllingstad <listmailemacs@kyllingstad.com>
> Date: Mon, 25 Mar 2013 16:38:06 +0100
> Cc: Andreas Schwab <schwab@linux-m68k.org>,
> 	"Emacs Dev \[emacs-devel\]" <emacs-devel@gnu.org>
> 
> > >   Reorder conditions that are written backwards
> >
> > Backwards according to what?
> 
> If you were explaining it to someone, which would you say:
> 
>      If i is greater than zero and less than N
> 
> or
> 
>      If zero is less than i, and i is less than N

This is not really relevant, as Andreas didn't change any code like
this:

  if (0 < i && i < N)

He only changed things like this:

  if (0 < i)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
  2013-03-25 15:49 ` Eli Zaretskii
@ 2013-03-25 16:30   ` Paul Eggert
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggert @ 2013-03-25 16:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: schwab, René Kyllingstad, monnier, emacs-devel

On 03/25/13 08:49, Eli Zaretskii wrote:
> Andreas didn't change any code like this:
> 
>   if (0 < i && i < N)

I'm afraid that he did change some range-checking code
like that.  The actual code was more complicated (the part
before the && was a conditional), but it was definitely
using that style before he changed it.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
  2013-03-25 15:38 [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards René Kyllingstad
  2013-03-25 15:49 ` Eli Zaretskii
@ 2013-03-26 13:56 ` James Cloos
  1 sibling, 0 replies; 7+ messages in thread
From: James Cloos @ 2013-03-26 13:56 UTC (permalink / raw)
  To: René Kyllingstad
  Cc: Andreas Schwab, Stefan Monnier, Emacs Dev [emacs-devel]

>>>>> "RK" == René Kyllingstad <listmailemacs@kyllingstad.com> writes:

RK> If you were explaining it to someone, which would you say:

RK>      If i is greater than zero and less than N

RK> or

RK>      If zero is less than i, and i is less than N

You left out:  If i is between zero and N.

The standard math notation is 0<i<N.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards
  2013-03-25 14:32   ` Andreas Schwab
@ 2013-03-26 14:21     ` Ted Zlatanov
  0 siblings, 0 replies; 7+ messages in thread
From: Ted Zlatanov @ 2013-03-26 14:21 UTC (permalink / raw)
  To: emacs-devel

On Mon, 25 Mar 2013 15:32:53 +0100 Andreas Schwab <schwab@linux-m68k.org> wrote: 

AS> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Backwards according to what?

AS> According to common sense.

My vote, FWIW, is to leave the original code alone.  Some authors prefer
to put the constant first.  Respect their style, or explicitly forbid
it, but please don't do drive-by style changes.

Ted




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-26 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25 15:38 [Emacs-diffs] /srv/bzr/emacs/trunk r112126: Reorder conditions that are written backwards René Kyllingstad
2013-03-25 15:49 ` Eli Zaretskii
2013-03-25 16:30   ` Paul Eggert
2013-03-26 13:56 ` James Cloos
     [not found] <E1UJknW-0004ja-JF@vcs.savannah.gnu.org>
2013-03-25 14:06 ` Stefan Monnier
2013-03-25 14:32   ` Andreas Schwab
2013-03-26 14:21     ` Ted Zlatanov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.