public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Nathan Bossart <[email protected]>
To: Andres Freund <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Documenting coding style
Date: Wed, 15 Apr 2026 20:10:59 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <adkOBpMyt0A6ki5U@nathan>
References: <[email protected]>
<[email protected]>
<[email protected]>
<CAN55FZ026+y8nJYR5w8miiaQ4Mw8F1xtBdTdR52cDZ4fn2pQ8g@mail.gmail.com>
<CA+hUKG+LekzSbmxbG4u5wDxQ9jHnzxN-wfdZ1pQSZquELmGtVA@mail.gmail.com>
<CAA5RZ0tXWJdL5mTJ8p9RrnThPoja-2LDykUykcbJt5iSjmWe6Q@mail.gmail.com>
<CAN55FZ1wLmdyMs4sABEad2MCKDtbK++F_ztjhkgEtaw+LahycA@mail.gmail.com>
<CA+hUKGJ4JcGNWV0KHD5iChGhJ5Z1F8RXSdxnt2yOoW+KHJuLaQ@mail.gmail.com>
<CA+hUKGJkeTVuq5u5WKJm6xkwmW577UuQ7fA=PyBCSR3h9g2GtQ@mail.gmail.com>
<[email protected]>
<adkOBpMyt0A6ki5U@nathan>
On 10.04.26 16:49, Nathan Bossart wrote:
>> I wonder if we should move the coding style section out of sgml into a
>> top-level CODING_STYLE.md or something like that.
>>
>> And then obviously add things like Size being deprecated.
> Unless we're going to actually remove the typedef in the near future, I'm
> not sure I'd support even marking it deprecated. If we're going to keep it
> around indefinitely, that's just going to become another source of nitpicks
> when new contributors inevitably copy/paste some code from the aughts. A
> style page makes the situation a little better, but it's yet another thing
> that folks have to remember.
In this case, if one wanted to do something, one should at least enhance
the code comment for Size, which is currently very bare and doesn't
explain why the type exists.
As some counterexamples, some of which I wrote:
/*
* Pointer
* Variable holding address of any memory resident object.
* (obsolescent; use void * or char *)
*/
typedef void *Pointer;
/* Historical names for types in <stdint.h>. */
typedef int8_t int8;
...
* We require C11 and C++11, so static_assert() is expected to be there.
* StaticAssertDecl() was previously used for portability, but it's now
just a
* plain wrapper and doesn't need to be used in new code.
view thread (35+ messages)
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]
Subject: Re: Documenting coding style
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