Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Дата
Msg-id 4f4852b9-0ed5-b84c-03ae-ebc7725219ea@anastigmatix.net
обсуждение исходный текст
Ответ на Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Ashwin Agrawal <aagrawal@pivotal.io>)
Ответы Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On 10/4/19 1:44 PM, Ashwin Agrawal wrote:

> macro exist in first place will be hard to remember. So, irrespective
> in long run, {0} might get used in code and hence seems better
> to just use {0} from start itself instead of macro/wrapper on top.
> 
> Plus, even if someone starts out with thought {1} sets them all to ones,
> I feel will soon realize by exercising the code isn't the reality.

I wish ISO C had gone the same place gcc (and C++ ?) went, and allowed
the initializer {}, which would eliminate any chance of it misleading
a casual reader.

If that were the case, I would be +1 on just using the {} syntax.

But given that the standard is stuck on requiring a first element,
I am +1 on using the macro, just to avoid giving any wrong impressions,
even fleeting ones.

Regards,
-Chap



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

Предыдущее
От: Ashwin Agrawal
Дата:
Сообщение: Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Следующее
От: Robert Haas
Дата:
Сообщение: Re: tableam vs. TOAST