Re: PEAR2 package naming standards (namespace usage)
| From: | Travis Swicegood | Date: | Wed, 27 Aug 2008 13:26:58 +0000 |
| Subject: | Re: PEAR2 package naming standards (namespace usage) | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50649@lists.php.net to get a copy of this message | ||
On Aug 27, 2008, at 5:15 AM, David Jean Louis wrote:
Martin Jansen a écrit :David, is correct here Martin. The reason is outlined from in the wiki:On Wed, Aug 27, 2008 at 11:16 AM, David Jean Louis <izimobil@gmail.comwrote:I think the main reason is to easily differenciate namespace parts which are not classes from real classes, eg: pear2::foo::bar::BazClassSpeaking of the lowercase idea, I'm all for it, but I think this decisionWhat is the exact reason for going lowercase? I'd prefer to stick to PEAR2::Foo::Bar::Baz() because this is more in line with the rest of the coding standards (-> camelCase) in my opinion.
By changing the package to lowercase it becomes immediately apparent what the instantiable class is.With mixed case through out the fully-qualified class name, it becomes ambiguous as to what is what.
But as I said, I think this decision should not be taken without some sort of consensus with the outside-pear world ;)If there were other sources to pull from, I'd be happy. The only things that have been proposed are changes to SPL (which I believe have all been shot down, correct me if I'm wrong?) and one post by MWOP about Zend Framework. Without any external guidance in PHP, we were left to rely solely on our experience with namespaces/packages in other languages. I believe this RFC accurately meshes the traditional PEAR1 style naming that we've become accustom to and the generally accepted use of namespaces throughout other languages that have dealt with the same issues. -T