Re: [Coding Standards] Prefix all classes

From: Date: Mon, 09 Jul 2007 22:07:28 +0000
Subject: Re: [Coding Standards] Prefix all classes
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47318@lists.php.net to get a copy of this message
On Jul 9, 2007, at 4:27 PM, Joshua Eichorn wrote:
Paul M Jones wrote:
But it does make sense that you should be able to install code like: pyrus install pear2/Group_Package or pyrus install PEAR2_Group_Package
Or even ...
    pyrus install pear2/PEAR2_Group_Package
I don't think PEAR2 is a special case. Anything we do for ourselves, we should expect to see emulated in other channels. Because channel aggregators exist, we should attempt to pre-emptively deconflict with package names from other channels. In fact, I might even go so far as to say that the installer should assume that the first element of the package name is the channel nickname. That would allow for a nice little shortcut, but of course I can't say how easy or hard that would be to implement.
I guess my point is that pear2/PEAR2_Group_Package is redundant, its double prefixing which seems a bit pointless
I can see your point on that. Even so, I think it's a small bit of redundancy that occurs only at install/upgrade time, but provides clarity in a multi-channel environment. To reiterate the earlier point (and not to add work for Greg ;-) it might be nice convention to state that the first element in the package name is assumed to be the channel nickname. That would eliminate the redundancy auto-magic-ally, and could help to encourage all channels to follow good name-spacing conventions. -- Paul M. Jones <http://paul-m-jones.com> Solar: Simple Object Library and Application Repository for PHP5. <http://solarphp.com> Join the Solar community wiki! <http://solarphp.org> Savant: The simple, elegant, and powerful solution for templates in PHP. <http://phpsavant.com>

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