Re: [Coding Standards] Prefix all classes
| From: | Paul M Jones | Date: | Mon, 09 Jul 2007 21:09:59 +0000 |
| Subject: | Re: [Coding Standards] Prefix all classes | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47306@lists.php.net to get a copy of this message | ||
On Jul 9, 2007, at 3:57 PM, Joshua Eichorn wrote:
David Coallier wrote:I see your point on the "ugly" portion in the UI. Having said that, I think the UI issue is easy to remedy, seeing as it is only a display issue; printing "PackageName" in the web UI when referencing "PEAR2_PackageName" seems relatively easy to me.On 7/9/07, Paul M Jones <pmjones@ciaweb.net> wrote:PEAR2_ prefix is required of all class names, package names, however, will not have a PEAR2_ prefix because in most cases, the installation will be like: pear install pear2/PackageNameHi all -- I'm going to offer discussion points on the coding standards proposal under separate subject lines, all prefixed with [Coding Standards]. This should make the separate discussions easily addressable. The section titled "Prefix all classes" states:Having every package named PEAR2_Group_Packagename makes for a really ugly listings on the command line and in the user interface.I think the PEAR2_ prefix should be on the package name as well. Although it adds typing, it also adds consistency. As an incidental benefit, this will aid name de-confliction for channel and package aggregator services like Pearified, Pearadise, etc.Yes.. a keyboard is meant to type.. PEAR2_ is not taking 3-4 hours to type. I'm all for using PEAR2 everywhere..
But it does make sense that you should be able to install code like: pyrus install pear2/Group_Package or pyrus install PEAR2_Group_PackageOr even ...
pyrus install pear2/PEAR2_Group_PackageI 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. -- 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>