public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Peter Smith <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Re: PublicationActions - use bit flags.
Date: Mon, 20 Dec 2021 14:58:06 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHut+Pt2hjRJxfuF9_GUcBVg=nhk3G+WNsNkPtP2d+4CF4e4Pg@mail.gmail.com>
References: <CAHut+Pt2hjRJxfuF9_GUcBVg=nhk3G+WNsNkPtP2d+4CF4e4Pg@mail.gmail.com>

On 20.12.21 01:18, Peter Smith wrote:
> For some reason the current HEAD PublicationActions is a struct of
> boolean representing combinations of the 4 different "publication
> actions".
> 
> I felt it is more natural to implement boolean flag combinations using
> a bitmask instead of a struct of bools. IMO using the bitmask also
> simplifies assignment and checking of said flags.

I don't see why this is better.  It just makes the code longer and adds 
more punctuation and reduces type safety.





view thread (12+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: PublicationActions - use bit flags.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox