Re: cleaning perl code

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cleaning perl code
Date: 2020-04-11 16:28:03
Message-ID: 97813D8D-F185-4998-8CF8-5678746E7DEE@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Apr 11, 2020, at 9:13 AM, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:

Hi Andrew. I appreciate your interest and efforts here. I hope you don't mind a few questions/observations about this effort:

>
> The
> last one fixes the mixture of high and low precedence boolean operators,

I did not spot examples of this in your diffs, but I assume you mean to prohibit conditionals like:

if ($a || $b and $c || $d)

As I understand it, perl introduced low precedence operators precisely to allow this. Why disallow it?

> and the use of commas to separate statements

I don't understand the prejudice against commas used this way. What is wrong with:

$i++, $j++ if defined $k;

rather than:

if (defined $k)
{
$i++;
$j++;
}


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul A Jungwirth 2020-04-11 16:36:37 Re: range_agg
Previous Message Jose Luis Tallon 2020-04-11 16:24:13 Re: where should I stick that backup?