Christophe Pettus <[email protected]> writes:
> On Jun 22, 2026, at 20:32, John Naylor <[email protected]> wrote:
>> Size, Index - These are not common, and I think they are actually
>> discouraged now, in favor of the more common size_t and uint32. I'm
>> not sure if there's a consensus on that, though.
> Thanks! I'll be happy to edit if appropriate.
I think the consensus is to prefer "size_t" over "Size" in all-new
code. But when modifying or adding to existing code, match what's
around you, which in many places favors "Size".
"Index" is in a grayer area because there was never a solid consensus
on what to use it for to begin with. Again, there are places where
the match-nearby-code rule tells you to use Index, but if that doesn't
apply I'd avoid it.
BTW, you might want to mention match-nearby-code in the para about
naming too. It's not like we have just one preferred naming style
--- depending on where you look, there's camelCase, CapitalizeEachWord,
use_underscores_instead, etc etc. I have no appetite for trying to
force tree-wide uniformity on that score; but I do get annoyed when
adjacent routines don't look anything alike.
regards, tom lane