Clarifications on Naming Conventions doc
| From: | Chuck Burgess | Date: | Wed, 09 Apr 2008 20:50:23 +0000 |
| Subject: | Clarifications on Naming Conventions doc | ||
| Groups: | php.pear.dev php.pear.doc | ||
| Request: | Send a blank email to pear-dev+get-49723@lists.php.net to get a copy of this message | ||
A short discussion today on #pear shows that a couple of points in the
Naming Conventions section [1] of the Coding Standards doc could use some
clarification.
The "Functions and Methods" section contains info for global functions and
class methods together, as well as info for class variables/members. By not
mentioning members, the heading itself can cause readers to skip over it if
they're looking specifically for info on member naming. Further, having
info on local class methods and global functions together sort of muddies
the water since the naming rules are different for each.
I'd suggest moving the global function naming down to the "Global Variables"
section (on the same page), maybe renaming it to "Global Variables and
Functions". This will separate the rules for Global Functions and Class
Methods.
Next, I'd suggest renaming "Functions and Methods" to "Class Members and
Methods", or maybe "Class Variables and Methods", to highlight that its
content is strictly concerning elements inside a Class.
Lastly, though this is the least necessary suggestion in my opinion, would
be to move the "Global" section up above the various "Class" sections. I
say this only because a reader might see the "Class Variables and Methods"
section and *assume* that the same rules apply to global variables and
functions. By moving the short "Global" section up above, I think this
potential mix-up is less likely to happen.
--
CRB
[1] - http://pear.php.net/manual/en/standards.naming.php