Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10315 invoked from network); 30 May 2017 08:21:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2017 08:21:44 -0000 X-Host-Fingerprint: 62.31.75.76 76.75-31-62.static.virginmediabusiness.co.uk Received: from [62.31.75.76] ([62.31.75.76:18346] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/AD-34073-59B2D295 for ; Tue, 30 May 2017 04:21:42 -0400 Message-ID: <84.AD.34073.59B2D295@pb1.pair.com> To: internals@lists.php.net References: <9dffe898-e550-c6d6-46bd-86dcf74735ea@fleshgrinder.com> In-Reply-To: <9dffe898-e550-c6d6-46bd-86dcf74735ea@fleshgrinder.com> Date: Tue, 30 May 2017 09:21:38 +0100 Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 X-Posted-By: 62.31.75.76 Subject: Re: Class Naming in Core From: TonyMarston@hotmail.com ("Tony Marston") wrote in message news:9dffe898-e550-c6d6-46bd-86dcf74735ea@fleshgrinder.com... > >Hey guys! > >People are complaining over at Reddit [1] about using PHP, Std, UUID, >... in other words about case. > >I know that this is probably a topic nobody cares much about, at least >we did not end up in this kind of bikeshedding in the UUID discussion >thread, but it is after all an important question when designing a >language. > >Our coding standards are extremely unspecific about this kind of >problem, the only thing that is written there is to avoid abbreviations, >and acronyms are not mentioned at all: > >https://github.com/php/php-src/blob/master/CODING_STANDARDS#L154-L166 > >The question is, what would you guys want? The PHP community that >follows the PSR rules is using PascalCase everywhere. The PHP core is >inconsistent: The notion that this little inconsistency causes a problem only exists in the minds of nit-pickers and OCD sufferers. The definition of "inconsistency" can be taken to ridiculous extremes, as in the following examples: - class/method names don't all begin with the same letter - that's inconsistent. - class/method names don't all contain the same number of characters - that's inconsistent. - class/method names don't all contain the same number of vowels and consonants - that's inconsistent. - class/method names don't all contain the same number of uppercase and lowercase characters - that's inconsistent. The very idea that there is a "standard" naming convention that everyone should follow I find most objectionable. The only universal standard is that every name be readable and convey meaning. Different projects/teams/organisations are free to use whatever naming convention they like, be it snake_case, CamelCase, studlyCaps or whatever, and they should not be forced to change just because some nerd has made a unilateral decision which is way above his pay grade. In my project I use a mixture of styles just because I can, but as each name is readable and conveys meaning it does not cause a problem, therefore does not require any sort of solution. There are more important changes which can be made to the language other than changing it to comply with someone's personal preferences, so this ridiculous idea should be kicked into the long grass. Just my personal opinion. -- Tony Marston