Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzJBA-0000nA-9o for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Dec 2021 13:58:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzJB8-0006bL-Rn for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Dec 2021 13:58:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzJB8-0006bC-Hc for pgsql-hackers@lists.postgresql.org; Mon, 20 Dec 2021 13:58:14 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzJB4-00049W-DQ for pgsql-hackers@lists.postgresql.org; Mon, 20 Dec 2021 13:58:13 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2DF275C0154; Mon, 20 Dec 2021 08:58:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 20 Dec 2021 08:58:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=nHAHKrjGrojLP17rq3U+OGdKnx6UK132OOjgAGqWQ D4=; b=G3hxbUj0wALA0GYj5MuF2FtTFIvnK5DxNuBrh8lFvYNIrTdqQPA/7zl+H +i1Y6q+dAbhyu8Npk6qVumPOLxGwmo6f7EcnfVd1Wffg8XfAXG/b6WiUt6z3H4on wIxOLpNP3lizqGOFFdtVlibSKZSjqP8mXIBTyq/nUC27BJ3yG/G+ILqcm3uGhhYv IlRgt531tOu9sQuUOOixr2KgxLas9zs8iSjoCzz3pdMQ3y4zaSqkrv8ZRpXp8t44 8ftA1gtbchxBIKt1nOuqzoLBsVSVuBiXcieawkdrxABvjnprGsA1cE2NWTO9rYEj HtmhCpVhcU7qkAXu7OgkrIWxdsd9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeejgeehteeuhfevvedu leeufedtjeetiefftedvudfhtdeifefgueettdevgefgnecuvehluhhsthgvrhfuihiivg epudenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Dec 2021 08:58:07 -0500 (EST) Message-ID: <3b7f2bdd-77ed-00d7-437c-dd9c37e6a2fa@enterprisedb.com> Date: Mon, 20 Dec 2021 14:58:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: PublicationActions - use bit flags. Content-Language: en-US To: Peter Smith , PostgreSQL Hackers References: From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.