...

View Full Version : Function v. method naming conventions - to camel or to underscore?



cfructose
03-28-2010, 12:14 PM
Taken from:

http://svn.php.net/viewvc/php/php-src/trunk/CODING_STANDARDS?view=co



Variable names should [...] [u]se underscores to separate between words
Function names [...] should be [...] underscore delimited
Method names [should] follow the [...] 'camel caps' [...] naming convention


Discuss!

(To what extent do you think these conventions matter when writing our code? (I'm not referring to writing core parts of PHP itself)
In particular, why the difference between functions and methods?)

MattF
03-28-2010, 03:20 PM
Personally, I detest the use of uppercase in code, full stop. Never use it and never will. Underscores between certain words, yes, but just depends on which looks best to the eye in each specific case. Sometimes I just string the words together if I think it looks nicer. My opinion is sod convention unless it has a useful purpose.

cfructose
03-29-2010, 10:37 AM
That pretty much echoes my feelings.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum