Re: StudlyCaps

From: Date: Sun, 07 Dec 2003 01:42:05 +0000
Subject: Re: StudlyCaps
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-6260@lists.php.net to get a copy of this message
On Dec 6, 2003, at 12:40 PM, Stefan Walk wrote:
On Sat, Dec 06, 2003 at 11:45:12AM -0500, George Schlossnagle wrote:
Why should methods differ from functions in naming? That in itself is inconsistency... I'm in favour of naming with underscores, simply because that was the PHP way until now and it helps readability a lot.
This is not really true. In PHP4 there were very few internal classes, so there was not much of a standard for naming class methods.
Again, why should method naming differ from function naming?
It seems that most of the folks who are siding behind using underscores aren't very interested in using OO code, while the people who are using OOP extensively already support StudlyCaps. My opinion may be biased though.
It is. One of the purest OO languages, Ruby, uses underscores to separate words in method names (I have to admit though that constants are named in CamelCase usually.)
That's great, but we're not discussing Ruby, we're discussing PHP. No amount of underscores in Ruby effects the fact that PEAR, which is a defacto part of PHP, has standardized on StudlyCaps and has a large amount of code written that way.
Huh? That's awful. Who supports that sort of magic?
That's not much more magic than case-insensitive functions.
I'm not a fan of case-insensitivity. If you propose removing that in PHP5, you'll get my vote (and many others). George

« previous php.internals (#6260) next »