Subject: [PATCH 0/6] Re: cleanups for git-send-email

From: Nicolas Sebrecht <[email-masked]>
Date: Thu, 30 Apr 2009 00:27:11 +0200

On Wed, Apr 29, 2009 at 03:48:51PM -0400, Bill Pemberton wrote:

> Again, it prevents bugs.  People use "and" vs "&&" as the same thing,
> when they are not.  The have different precedence in perl.

I agree with you except that the chapter 4.16 from the Perl Best
Practices book does not apply here. FMPOV, we don't really mix booleans
because the precedence is explicitly given by the parentheses.

[ Notice _how_ the author raises the ambiguity to explain his point in
  the book: he uses parentheses. ]

> For example, 
> 
> next if not $finished || $x < 5;
> next if !$finished || $x < 5;
> 
> do not mean the same thing.

True. But the lines we are talking about are different. We have:

	next if ($finished or $x < 5);

If we add a "not"/"!" or append a "&&"/"and" - or whatever -, we do know what will
be evaluated easily:

	next if !($finished or $x < 5);

looks rather different from

	next if (!$finished or $x < 5);

-- 
Nicolas Sebrecht