At Thu, 17 Oct 2019 16:30:02 +0900, Michael Paquier <mich...@paquier.xyz> wrote in > On Thu, Oct 17, 2019 at 06:37:11PM +1300, Thomas Munro wrote: > > -1 for these macros. > > > > These are basic facts about the C language. I hope C eventually > > supports {} like C++, so that you don't have to think hard about > > whether the first member is another struct, and recursively so … but > > since the macros can't help with that problem, what is the point? > > FWIW, I am not convinced that those macros are an improvement either.
FWIW agreed. I might have put +1 if it had multpile definitions according to platforms, though. > > I am reminded of an (apocryphal?) complaint from an old C FAQ about > > people using #define BEGIN {. > > This one? Wow. > http://c-faq.com/cpp/slm.html I remember this. Though the new macro proposed here doesn't completely seems to be a so-called nonsyntactic macro, but the syntax using the macro looks somewhat broken since it lacks {}, which should be there. bool nulls[Natts_pg_collection] = INIT_ALL_ELEMS_ZERO; We could abuse the macro for structs. pgstattuple_type stat = INIT_ALL_ELEMS_ZERO; This is correct in syntax, but seems completely broken. regards. -- Kyotaro Horiguchi NTT Open Source Software Center