Re: Making C function declaration parameter names consistent with corresponding definition names

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Making C function declaration parameter names consistent with corresponding definition names
Дата
Msg-id CAH2-WzmykEKQzrcxHZNAuUs7GE2pL+jMa=vMZAzoXhrjG6L6XQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Making C function declaration parameter names consistent with corresponding definition names  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Making C function declaration parameter names consistent with corresponding definition names  (Michael Paquier <michael@paquier.xyz>)
Re: Making C function declaration parameter names consistent with corresponding definition names  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Fri, Sep 16, 2022 at 6:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think they're easily Stroustrup's worst idea ever.  You're basically
> throwing away an opportunity for documentation, and that documentation
> is often sorely needed.

He could at least point to C++ pure virtual functions, where omitting
a parameter name in the base class supposedly conveys useful
information. I don't find that argument particularly convincing
myself, even in a C++ context, but at least it's an argument. Doesn't
apply here in any case.

> I'd view the current state of reorderbuffer.h as pretty unacceptable on
> stylistic grounds no matter which position you take.  Having successive
> declarations randomly using named or unnamed parameters is seriously
> ugly and distracting, at least to my eye.  We don't need such blatant
> reminders of how many cooks have stirred this broth.

I'll come up with a revision that deals with that too, then. Shouldn't
be too much more work.

I suppose that I ought to backpatch a fix for the really egregious
issue in hba.h, and leave it at that on stable branches.

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Making C function declaration parameter names consistent with corresponding definition names
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: why can't a table be part of the same publication as its schema