Re: Naming convention

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Naming convention
Дата
Msg-id 15839.1033961640@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Naming convention  (Alvaro Herrera <alvherre@atentus.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@atentus.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: cross-posts (was Re: [GENERAL] Large databases, performance)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pg_filedump