Re: strange case of "if ((a & b))"

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: strange case of "if ((a & b))"
Date: 2021-08-18 18:02:22
Message-ID: 20210818180222.GE13002@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 24, 2021 at 09:31:11PM -0500, Justin Pryzby wrote:
> On Wed, Apr 28, 2021 at 02:40:09PM -0400, Tom Lane wrote:
> > Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
> > > These look strange to me - the inner parens don't do anything.
> > > I wouldn't write it with 2x parens for the same reason I wouldn't write it with
> > > 8x parens.
> >
> > Agreed, but shouldn't we just drop the excess parens rather than
> > doubling down on useless notation?
>
> I believe I got the impression from Michael that there was a style preference
> to write != 0.
>
> 0002 is a bonus patch I found in my typos branch. I will hold onto it for
> later if nobody wants to deal with it.

I am ready to deal with this patch. Should I apply it to master soon?

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

If only the physical world exists, free will is an illusion.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2021-08-18 18:02:31 Re: archive status ".ready" files may be created too early
Previous Message Bruce Momjian 2021-08-18 17:48:44 Re: [Patch] change the default value of shared_buffers in postgresql.conf.sample