RE: [PEAR-DEV] Re: PEAR2 Coding standards, Autoloading and Namespaces

From: Date: Sat, 05 Apr 2008 19:29:16 +0000
Subject: RE: [PEAR-DEV] Re: PEAR2 Coding standards, Autoloading and Namespaces
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49641@lists.php.net to get a copy of this message
+1 for Example 2 too :-) There is some good logic to map namespace to package, since you will probably want to prevent two classes to share the same name in a package. Yet this does not provide any solution to what has been previously discussed, that is, whether/how PEAR can handle hierarchical packages. >The only valid reason for not doing it is that it might be confusing >to those who have never seen namespaced code. One option to remedy >that is to take the approach of Java packages where everything lower >case until the object Put simply, Java packages are lower case. Point. But PEAR packages are not. I heard that PHP7 might become tacky with case. Is it only a rumour or.. ? Anyway, I don't find PEAR2::Foo::Foo() schocking. It's like defining a method hello() in a Hello class. This has been so natural that, in ancient times, this was called a constructor. By analogy, Foo is the first class you would be expected to use in a Foo package (although this remains a possibility) Baptiste

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