Re: Naming convention

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Naming convention
Date: 2002-10-07 03:34:00
Message-ID: 15839.1033961640@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)atentus(dot)com> writes:
> What's the naming convention for new functions/variables? I've seen
> this_way() and ThisWay() used without visible distinction. I've used
> both in previously submitted and accepted patches...
> Does it matter?

Consistency? We don't need no steenking consistency ;-)

Seriously, you can find a wide range of naming conventions in the PG
sources. It might be better if the range weren't so wide, but I doubt
anyone really wants to engage in wholesale renaming (let alone getting
into the flamewars that would ensue if we tried to pick a One True
Naming Style).

I'd suggest conforming to the namestyle that you see in code closely
related to what you are doing, or at least some namestyle you can find
precedent for somewhere in the backend. Beyond that, no one will
question you.

My own two cents: pay more attention to the semantic content of your
names, and not so much to how you capitalize 'em. FooBar() is a useless
name no matter how beautifully you present it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2002-10-07 04:42:15 pg_filedump
Previous Message Tom Lane 2002-10-07 03:20:33 cross-posts (was Re: Large databases, performance)