Re: PEAR2 wiki document
| From: | Chuck Burgess | Date: | Sun, 26 Aug 2007 19:22:08 +0000 |
| Subject: | Re: PEAR2 wiki document | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47842@lists.php.net to get a copy of this message | ||
On 8/26/07, Travis Swicegood <development@domain51.com> wrote:
>
> Re: Namespaces and package names:
> I'm not thrilled with mixing _ and ::. Using PEAR2_HTTP_Request to
> install PEAR2::HTTP::Request doesn't make sense to me. I would much rather
> see it as pyrus install PEAR2::HTTP::Request. I'm not sure I see the reason
> to use underscores in place of double-colons within the name other than BC
> which PEAR2 hasn't been worried with thus far.
Having it said that way, I'm inclined to agree. If the "need" that was
solved by the naming convention PEAR_Package_Class was only for namespacing,
and the new PEAR2::Package::Class namespacing now solves the need, I can
understand letting this naming convention go as part of the PEAR2 move.
On another note, what about incorporating a channel level namespace into the
> installer? Channels currently serve as a faux-namespace, but if we have
> real ones couldn't we remove the pear.example.com from the beginning and
> replace that with the fully declared namespace? This being the case I think
> we'll need an organization outside of PEAR to serve as a registrar for
> namespaces within PHP land to help avoid any namespace conflicts, but that's
> a topic for another discussion.
Sounds like the com.sun.* and org.npr.* type of top-level package
namespacing from Java... therefore, sounds reasonable to me. Then again,
the last note in the Data Files section of the wikidoc (
http://wiki.pear.php.net/index.php/PEAR2_Standards#Data_files)
seems to tell
me that the channel is indeed acting as an implicit top-level namespace,
even if it is not having to be explicitly named in the package's code
itself. Am I incorrect here?
--
CRB - BC 1B 64 4A 8D DE 49 E8 C3 7D CC EE 1A AD EE F5