Re: New PCRE function
| From: | Rowan Tommins | Date: | Wed, 19 Feb 2020 17:35:33 +0000 |
| Subject: | Re: New PCRE function | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108680@lists.php.net to get a copy of this message | ||
On Wed, 19 Feb 2020 at 17:15, Mike Schinkel <mike@newclarity.net> 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.
Regards,
--
Rowan Tommins
[IMSoP]