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 | b8552f00-8014-873f-e180-b2c0a339d005@anastigmatix.net обсуждение исходный текст |
Ответ на | Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays ("Joe Nelson" <joe@begriffs.com>) |
Ответы |
Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
|
Список | pgsql-hackers |
On 10/21/19 11:25 AM, Joe Nelson wrote: > we have the > INIT_ALL_ELEMS_ZERO macro to avoid (2). However the more I look at the > code using that macro the less I like it. The {0} initializer is more > idiomatic. If faced with the two questions: 1. which of a or b is more "clear" ? 2. which of a or b is more "idiomatic" ? I think I would feel on more solid ground opining on (1), where wrt (2) I would feel a little muzzier trying to say what the question means. It seems to me that idioms are common bits of usage that take off because they're widely recognized as saying a specific thing efficiently and clearly. On that score, I'm not sure {0} really makes a good idiom ... indeed, it seems this conversation is largely about whether it /looks/ too much like an idiom, and to some readers could appear to be saying something efficiently and clearly but that isn't quite what it means. I would favor {} in a heartbeat if it were standard, because that sucker is an idiom. Failing that, though, I think I still favor the macro, because question (1) seems less fuzzy than question (2), and on "clear", the macro wins. Regards, -Chap
В списке pgsql-hackers по дате отправления: