Re: Class Naming in Core

From: Date: Wed, 31 May 2017 09:26:06 +0000
Subject: Re: Class Naming in Core
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-99292@lists.php.net to get a copy of this message
wrote in message news:86dba466-a764-522b-6990-39fd7668a79c@fleshgrinder.com...
Hey Stas! On 5/30/2017 1:00 AM, Stanislav Malyshev wrote:
Hi!
People are complaining over at Reddit [1]
Isn't it what Reddit is for? ;)
I guess it is. ;)
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.
I personally don't think it is a very important decision, since nothing much would change either way, but my preference would be: 1. If there's an established acronym, keep it (GMP, DOM, XML, HTTP). 2. If it's just words, use CamelCase. Second preference is all CamelCase, treating acronyms as a single word (e.g. RpcOverHttpsViaXml).
Exactly how I see it. I am only asking to decide on one of both and put it into our coding standard so people who keep on complaining can be pointed there, and we're done.
I should point out that snake_case was the universal standard decades before some people switched to CamelCase. That was only because some software could not handle long names, but could handle both upper and lower case, so an upper case character was used instead of an underscore. That limitation of the size of names no longer exists in any modern software, so the continued use of CamelCase is out of habit and not necessity. -- Tony Marston

« previous php.internals (#99292) next »