Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpJc2-00021H-QP for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2017 19:34:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dpJc1-00076F-AC for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2017 19:34:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dpJaT-0004Mz-5Y for pgsql-hackers@postgresql.org; Tue, 05 Sep 2017 19:32:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dpJaI-0006ri-Ea for pgsql-hackers@postgresql.org; Tue, 05 Sep 2017 19:32:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v85JWRV8011525; Tue, 5 Sep 2017 15:32:27 -0400 From: Tom Lane To: Peter Eisentraut cc: Michael Paquier , pgsql-hackers Subject: Re: assorted code cleanup In-reply-to: References: <2beab0ef-69f9-dab3-cacd-8fdf417bca96@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Tue, 05 Sep 2017 15:12:41 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11523.1504639947.1@sss.pgh.pa.us> Date: Tue, 05 Sep 2017 15:32:27 -0400 Message-ID: <11524.1504639947@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Peter Eisentraut writes: > Do you mean specifically the hook variables, or any function pointers? > I can see your point in the above case, but for example here > - if ((*tinfo->f_lt) (o.upper, c.upper, flinfo)) > + if (tinfo->f_lt(o.upper, c.upper, flinfo)) > I think there is no loss of clarity and the extra punctuation makes it > more complicated to read. At one time there were C compilers that only accepted the former syntax. But we have already occurrences of the latter in our tree, and no one has complained, so I think that's a dead issue by now. I do agree with the idea that we should use the * notation in cases where the reader might otherwise think that a plain function was being invoked, ie I don't like some_function_pointer(args); Even if the compiler isn't confused, readers might be. But in the case of structname->pointerfield(args); it's impossible to read that as a plain function call, so I'm okay with dropping the extra punctuation there. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers