designated initializers

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: designated initializers
Date: 2022-08-10 14:03:00
Message-ID: 20220810140300.ixhbmm4svo5yypv6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(Coming from https://postgr.es/m/20220809193616.5uucf33piwdxn452@alvherre.pgsql )

On 2022-Aug-09, Alvaro Herrera wrote:

> On 2022-Aug-09, Andres Freund wrote:
>
> > Mildly wondering whether we ought to use designated initializers instead,
> > given we're whacking it around already. Too easy to get the order wrong when
> > adding new members, and we might want to have optional callbacks too.
>
> Strong +1. It makes code much easier to navigate (see XmlTableRoutine
> and compare with heapam_methods, for example).

For example, I propose the attached.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")

Attachment Content-Type Size
0001-use-designated-initializors.patch text/x-diff 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-08-10 14:08:02 Re: moving basebackup code to its own directory
Previous Message Andrew Dunstan 2022-08-10 13:56:21 Re: s390x builds on buildfarm