Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPKyK-0002ix-PQ for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2020 06:59:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jPKvt-0002v3-Da for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2020 06:57:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPKvt-0002uw-6h for pgsql-hackers@lists.postgresql.org; Fri, 17 Apr 2020 06:57:01 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jPKvm-00077o-Vg for pgsql-hackers@postgresql.org; Fri, 17 Apr 2020 06:57:00 +0000 Received: by mail-pf1-x443.google.com with SMTP id u65so640022pfb.4 for ; Thu, 16 Apr 2020 23:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=y5H8atPxVfyIXlcFLgdjPAmjruPvBMv29OAaRdMaxSU=; b=gIorx/B2EV5/jiqf+CpODxnP89Zkyo4kVUH/+RH6uUB+p9i1J44nhFSgsF6WPOcLm0 UBiaPYEHqyj4Y0JacLtkIpWAygN/dSNdlZFOmtERHGYJw/fRsFPGdiaMG4o8t03CDFC2 H7G7QRpmFrS/A4UmbIlb8LCdzCtbg6PozHS4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=y5H8atPxVfyIXlcFLgdjPAmjruPvBMv29OAaRdMaxSU=; b=rvCzCv0e6hH4LcvkKlPTLyrn+AiEqQlo6YOmtFjTQCpb0St24RIxZUTzlk1hOKLLC0 2sRtKepZgVoREGGBBFaT+6cRNvJ7YYWm2SVjPswuvK4SuZfnla6xYS16P6igNYS1jZHL sY6++DnaK5HtUACGl1X3t41LlhSiHylQE3VzzQ3tijh5ttFBnYzd+asD+aWlg7Q/clIM rQ4dqqznJDDVZn9Ahhw3GJBoGUg1YX6aNWi6+iliaw5fkc/C8TSnpD/no2c2+1j9Kpbi FlV8oo0ci7hw+SS0sF9q2Eh2+fPFf+/OmGeD/0tIOWaBiglCMol+aa0DQ1UIVnM8UC46 n1+g== X-Gm-Message-State: AGi0Pua5GqzMgQFsrvLbQVzybV/N+I35f2Z6jfagIs6FOA1skNxGFQXa Wv3iyDBd2BQXVaP6J0TuL92l8mmx0do= X-Google-Smtp-Source: APiQypLgmZYINhszBgp0PZSJbtDKlXtfJ+u/v4PTmwsWg1o+GmG8DXqR2XMz1F3hi4je0EONr+E49g== X-Received: by 2002:a63:f45:: with SMTP id 5mr1537642pgp.31.1587106612802; Thu, 16 Apr 2020 23:56:52 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id e11sm18923041pfl.65.2020.04.16.23.56.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2020 23:56:52 -0700 (PDT) Date: Thu, 16 Apr 2020 23:56:49 -0700 From: Noah Misch To: Tom Lane Cc: Andrew Dunstan , Alvaro Herrera , PostgreSQL-development Subject: Re: cleaning perl code Message-ID: <20200417065649.GC1061007@rfd.leadboat.com> References: <20200414204432.GA22922@alvherre.pgsql> <86b0e20d-efc1-4169-aeb1-be49b3a375ab@2ndQuadrant.com> <20200416030101.GB977691@rfd.leadboat.com> <4426.1587045226@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4426.1587045226@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Apr 16, 2020 at 09:53:46AM -0400, Tom Lane wrote: > Andrew Dunstan writes: > > On 4/15/20 11:01 PM, Noah Misch wrote: > >> It would be an unpleasant surprise to cause a perlcritic buildfarm failure by > >> moving a function, verbatim, from a non-strategic file to a strategic file. > >> Having two Perl style regimes in one tree is itself a liability. > > > Honestly, I think you're reaching here. > > I think that argument is wrong, actually. Moving a function from a single > use-case into a library (with, clearly, the intention for it to have more > use-cases) is precisely the time when any weaknesses in its original > implementation might be exposed. So extra scrutiny seems well warranted. Moving a function to a library does call for various scrutiny. I don't think it calls for replacing "no warnings;" with "no warnings; ## no critic", but that observation is subordinate to your other point: > Whether the "extra scrutiny" involved in perlcritic's higher levels > is actually worth anything is a different debate, though, and so far > it's not looking like it's worth much :-( Yeah, this is the central point. Many proposed style conformance changes are (a) double-entry bookkeeping to emphasize the author's sincerity and (b) regex performance optimization. Those are not better for libraries than for non-libraries, and I think they decrease code quality. Even if such policies were better for libraries, the proposed patch applies them to .pm files with narrow audiences. If DBD::Pg were in this tree, that would be a different conversation.