Re: [RFC] [VOTE] pecl_http

From: Date: Sat, 31 Jan 2015 10:18:31 +0000
Subject: Re: [RFC] [VOTE] pecl_http
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-81478@lists.php.net to get a copy of this message
"Larry Garfield" wrote in message news:54CBB0CD.9010707@garfieldtech.com...
On 1/30/15 4:08 AM, Tony Marston wrote:
""Pavel Kouril"" wrote in message news:CAB6YZuzyMBAa5i3f9NsvebG2B7YJvO4RyVpy-eac78rsOJxdhQ@mail.gmail.com...
On Wed, Jan 28, 2015 at 1:17 PM, Michael Wallner <mike@php.net> wrote: just one observation - would be the name of the classes and namespaces stay the same after merging? I personally find the lowercased namespace name kinda weird, given that most of code written in PHP I've seen is using CamelCase.
Just because that most of the code YOU have seen uses CamelCase does not mean that CamelCase is the "standard". I programmed in other languages for over 20 years before I switched to PHP, and in those languages the standard was snake_case. That is the standard I still use, and I will object most strongly to the notion that I should change the habits of a lifetime just to suit the personal preferences of a junior programmer. By "junior" I mean "years of experience", not "job title".
Core uses CamelCase class names. The overwhelming majority of the PHP code I've seen in the wild uses CamelCase for both classes and namespaces.
I'm afraid that "code that I have seen" is only a small fraction of all the "code that has been written". I use snake_case simply because it was the standard in those language which I used in the 20 years before switching to PHP. PHP has never enforced any particular naming convention, nor should it. Thus I am free to whatever I please, whether it be snake_case, camelCase, StudlyCaps or whatever.
Other languages certainly have other conventions, but this is PHP.
It is not up to the language to dictate coding style or naming conventions, that is entirely the domain of each group of programmers.
This isn't "personal preference of a junior programmer" (which is a rather flippant way to dismiss a fellow developer you do not know).
I have been in the software industry for over 35 years, and I have encountered many different standards, some good, some bad. The standards that I still use today are based on all the better parts from those individual standards. I object most strongly to a programmer who has far less experience than me suddenly telling me that I must change the habits of a lifetime so that my coding style conforms to his personal preferences. Such arrogance!
It's the convention used by most of an industry.
How do you know that it "most of the industry"? Snake_case existed for years before camelCase was invented, and is still used by many. It is even evident in PHP itself, so your assertion is just a personal opinion and not a fact. -- Tony Marston

« previous php.internals (#81478) next »