public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Chao Li <[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: Tue, 02 Dec 2025 18:13:16 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <aS9hkwnkWf3dZIA_@nathan>
<[email protected]>
<[email protected]>
<[email protected]>
Chao Li <[email protected]> writes:
>> On Dec 3, 2025, at 06:51, Tom Lane <[email protected]> wrote:
>> In this case, I think pgindent is indirectly enforcing good style.
>> I do not like omitting braces around anything that's more than one
>> line; readers have to pay close attention to whether the code is
>> doing what it was intended to.
> For “one line”, do you mean only a single line of statement or one line statement plus one line comment?
In my head, a comment and a statement are two lines, and so need
wrapping braces as much as two statements would do. I realize that
C compilers think differently, but for readability and modifiability
reasons that's the approach I take.
regards, tom lane
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]
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