public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: Andrew Dunstan <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Rahila Syed <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pgindent versus struct members and typedefs
Date: Wed, 3 Dec 2025 18:25:27 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 2025-Dec-03, Andrew Dunstan wrote:

> +1. One of the things I find particularly un-aesthetic is having some
> branches of an if statement with braces and some without. We have lots of
> cases of that, but I try to avoid it.

I actually prefer that style: when there are only two branches, and the
other branch of the if is long, I put the short one first without
braces, and then braces around the long "else" one.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"The eagle never lost so much time, as
when he submitted to learn of the crow." (William Blake)





view thread (22+ 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], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgindent versus struct members and typedefs
  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