Re: PEAR Coding Standards question

From: Date: Tue, 19 Aug 2008 17:01:22 +0000
Subject: Re: PEAR Coding Standards question
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50566@lists.php.net to get a copy of this message
I'm with joe.. The 'private' or 'protected' keyword is already more clear than an _. Its a language feature, and _ just feels like a hack from the PHP4 days.. (but yea, who am i? :) ) On 19-Aug-08, at 12:54 PM, Joe Stump wrote:
On Aug 19, 2008, at 9:49 AM, Chuck Burgess wrote:
On Tue, Aug 19, 2008 at 11:39 AM, Kevin van Zonneveld < kevin@vanzonneveld.net> wrote:
Why are the coding conventions so that I'm not allowed to prefix protected methods with an underscore?
The decision on that was made on this old RFC [1]. Perhaps we should revisit it with a fresh discussion?
I never understood the prefixing of functions that are private or protected. They're clearly marked as such and, if you try to use one, you know instantly that you can't. These aren't the olden days of PHP4 (or Python) where you can run a "protected" or "private" method if you wish without the interpreter complaining. In fact, I dislike underscores so much I rarely if ever use private in my PEAR code. :) That being said, if you *wish* to prefix them then by all means have at it in my opinion (though our CS specifically reserves this in PHP5 code for private methods). --Joe


« previous php.pear.dev (#50566) next »