Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdHqI-004oFs-4h for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 22:47:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rdHqE-00EVpb-OV for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 22:46:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdHqE-00EVpT-6s for pgsql-hackers@lists.postgresql.org; Thu, 22 Feb 2024 22:46:58 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rdHqB-000PDS-2O for pgsql-hackers@postgresql.org; Thu, 22 Feb 2024 22:46:57 +0000 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5dbcfa0eb5dso172221a12.3 for ; Thu, 22 Feb 2024 14:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1708642012; x=1709246812; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=YMMCN7G8vG6CdwcL5rOXv/EsX9ylrrtUHeTOgRtpfOQ=; b=ZKCgDCojtrF/5qeVAWeh8f8i0rW/mKkU4MuvNBvaBPbABQdN47CAqnz2CPdfcVA6L3 HtiIskClLIQSuUNKGz4me7hxoEjM9Do72Y0Hh9287RxAZDwIUXGJ1aGclTXQl+xX0ouQ Y8idrHVfvk48/QOpC/w0KeKNNBlMREjmgSjvF3JAjcjsT5GtauZTJjaIj/aCXKMhuGol Acm6tXhDJa4HSmPMmjNV2zCXL7b8lATBDoT5uamHUOAvYfiuPXvBQkMMMCNv92r3uV2F q08JzHpGOQAHKBfhve6b4Fsp2MUnvocvrkVSs1x34ePMaPfNMwXXLnzkcrGex9FHyozs pVDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708642012; x=1709246812; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YMMCN7G8vG6CdwcL5rOXv/EsX9ylrrtUHeTOgRtpfOQ=; b=OYkRodJjr7dsNKWLMpB5Qb68BC/QjYVIFdAntLvRZY3JmnQfrlH+yr24cFyCoL1afF pFrCqSMzpIhs5uJs+qfLXZ0OHx0aMrR8Gtx6G4wC+laTsuRSTzA4O6njltenXrSok9h1 Go8wfgl/ssyJATfIfnOJTJjPHtrjXia1J8Qqn7cFrzhTdzmylSRfDPlSAg57qtYaGnAq yEUWxqrDqB0haJmv6aG+EOBjc76C+4+292oIPDrRalPTpr5I+K2H/ycFse6mya4Gom5C /c1QlY/pbLtFK5oX+t1Vt/9WNWDo9MpgtzRJm2bu19GFv6tW0fXb8gj5HinmyJJvhNv9 ckjA== X-Forwarded-Encrypted: i=1; AJvYcCUGyUFmKA6p/yAzuqxUp0t9/MZOAL1+/Gy3ocHE/UTPe19lPOavm8P/1LvAqwH58WMepeJdQw62ybLgooBJTJnhgt4HLqz+UVHXqsFE X-Gm-Message-State: AOJu0YzTGnUtgTYODAOVzFyKsmzGGny9vByNqRfSqbfYjp97WlCZug1O tCw6k887WT7Xx3aXihpkzqJFaDIEjzqhVEsVYKx1qbJ1fPnTD2ytu5xAgPEPtw== X-Google-Smtp-Source: AGHT+IEB0YqfuzA9V6wYM6+KDPCbU/DFteWLh3nY4fedIrfrmxBbZKMUdtf4WCRUYzMH3inXtKLqrg== X-Received: by 2002:a05:6a20:b7a0:b0:19c:9eea:e731 with SMTP id fh32-20020a056a20b7a000b0019c9eeae731mr181889pzb.40.1708642012469; Thu, 22 Feb 2024 14:46:52 -0800 (PST) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id h26-20020aa79f5a000000b006e410699a5fsm9631737pfr.191.2024.02.22.14.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 14:46:52 -0800 (PST) Message-ID: Subject: Re: Improve readability by using designated initializers when possible From: Jeff Davis To: Jelte Fennema-Nio , PostgreSQL-development Cc: Michael Paquier , Alvaro Herrera Date: Thu, 22 Feb 2024 14:46:51 -0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2024-02-21 at 16:03 +0100, Jelte Fennema-Nio wrote: > Usage of designated initializers came up in: > https://www.postgresql.org/message-id/flat/ZdWXhAt9Tz4d-lut%40paquier.xyz= #9dc17e604e58569ad35643672bf74acc >=20 > This converts all arrays that I could find that could clearly benefit > from this without any other code changes being necessary. Looking at the object_classes array and the ObjectClass enum, I don't quite understand the point. It seems like a way to write OCLASS_OPCLASS instead of OperatorClassRelationId, and similar? Am I missing something? Regards, Jeff Davis