Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108695 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49184 invoked from network); 20 Feb 2020 10:56:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Feb 2020 10:56:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E4B3D180531 for ; Thu, 20 Feb 2020 01:12:17 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 20 Feb 2020 01:12:17 -0800 (PST) Received: by mail-lj1-f170.google.com with SMTP id a13so3377910ljm.10 for ; Thu, 20 Feb 2020 01:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XqtZIlV4zNpR4mn+1T3B+18DJTJ8PP8+n+ZcYnU8Co8=; b=UEtPGXsWzzuP7QWCNMjpTxzxzPsngfGGoDCg89Tr6yEXQZMl9+e8Dn95XwnDpLFUdn h7lv9aOtXN5LoZWjsM4XNEoJWrbLZ15IH2dRe1R1JWccTAHZSzNXp4CW/IFaoQNWHRNT yAxVhp5mz5IlNU4K7uB9T5trhTZwVvvZ55hrmLxX63KoZSOpmnctZpgt3QbpMF+o4lp3 /YNU3ayHqfD1RJve7/A+xK2JEIE4heYUkGjRfJh0WHqZoi01mItnLfxWnjxBC2KvNBZM MQje2beEDC9p5V8DLUDnaNyow838lG6Buf0qcr73W7dmoRrFpHRpfeTJ1x73f5e3avDF MtnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XqtZIlV4zNpR4mn+1T3B+18DJTJ8PP8+n+ZcYnU8Co8=; b=q1iuu93VC01bn9las9a/6Jn2GZp/XQ2z9OqlyoA7S8WPaS7KMHuTDjZc/4xuIiRvkd 3aGP9z0xdP2sKVEat2bneMVBYLa+9vID2uPXxJudw+O/Wbo+23/eDSZqFcFRg9f3byFH RNyM89J4DdJuWgyEAdCOdCTeHwkpbvnM0808ymb3wjMd8wG5i9EgWj/CU21QyxQ9T+Bj kTOoLyavs83cK42lNUCOGjjk8d7tJncG6k7V4cR/hPc/NxuNWd7GgKXnCGH4MTee56au x76afMkMvd6H+i1iGRpYCboFuSnhHtsTtarzHHrnAIYg4QQIz0e23ZxTaEiAHe7LoTnM Ov8Q== X-Gm-Message-State: APjAAAWEW3ZGsRnAtJvgE1/bjGLd6gYk0gDSsHWOYOvDn+eK/G9w875X xGidRn/CgaejM7q5Zvv1v3EULbMdrK6PFFCNLos= X-Google-Smtp-Source: APXvYqwGFeTUj6CX8CvAhW+rIkNiXRAztVW4eS1Msp40i8jRIBrQ5JFVQ9uy9vcRNlc2343HoQZJZ0GBj63FYvlM7tU= X-Received: by 2002:a2e:9744:: with SMTP id f4mr19275985ljj.267.1582189935185; Thu, 20 Feb 2020 01:12:15 -0800 (PST) MIME-Version: 1.0 References: <1586E4D0-B327-46A1-92C3-F9E2F89E33DB@newclarity.net> In-Reply-To: Date: Thu, 20 Feb 2020 10:11:59 +0100 Message-ID: To: Rowan Tommins Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000000dd2e9059efe4d4a" Subject: Re: [PHP-DEV] New PCRE function From: nikita.ppv@gmail.com (Nikita Popov) --0000000000000dd2e9059efe4d4a Content-Type: text/plain; charset="UTF-8" On Wed, Feb 19, 2020 at 6:36 PM Rowan Tommins wrote: > On Wed, 19 Feb 2020 at 17:15, Mike Schinkel wrote: > > > From https://github.com/golang/go/wiki/CodeReviewComments#error-strings > > > > "Error strings should not be capitalized (unless beginning with proper > > nouns or acronyms) or end with punctuation, since they are usually > printed > > following other context. That is, use fmt.Errorf("something bad") not > > fmt.Errorf("Something bad"), so that log.Printf("Reading %s: %v", > filename, > > err) formats without a spurious capital letter mid-message. This does not > > apply to logging, which is implicitly line-oriented and not combined > inside > > other messages." > > > > > Thanks, I can see the reasoning, although I'm not sure I agree with it. > > If you're only showing it to a programmer, worrying about the grammar of a > capital letter after a colon seems needlessly pedantic. If you're showing > it to end-users, you should probably be thinking about i18n anyway, and can > load your own English translations (and user-friendly summaries) for > whatever context you want to show them in. > FWIW, it is our established stance that all error messages must be capitalized. Lower-case first character is only permitted if it is part of a function name, or similar cases. Regards, Nikita --0000000000000dd2e9059efe4d4a--