|
Posted by Shelly on 11/27/11 11:54
"Tim Hunt" <tim.n.hunt@gmail.com> wrote in message
news:1154520242.006259.252860@i3g2000cwc.googlegroups.com...
>
> Tony Marston wrote:
>> I disagree. I *MUCH* prefer to see foo, $foo, foo() and $object->foo() to
>> differentiate between constants, variables, functions and methods than a
>> slight alteration in case. So do the authors of PHP, ad its millions of
>> users.
>
> I disagree, the authors of php use many upper and lower case naming
> conventions.
>
> http://cvs.php.net/viewvc.cgi/php-src/CODING_STANDARDS?revision=1.32.4.3&view=markup
>
> Here's part of the section titled Naming Conventions. ( They also use
> the C convention of naming macros in all uppercase and functions in all
> lowercase seperated with'_' )
>
> 5] Variable names should be in lowercase. Use underscores to separate
> between words.
>
> [6] Method names follow the 'studlyCaps' (also referred to as 'bumpy
> case'
> or 'camel caps') naming convention, with care taken to minimize the
> letter count. The initial letter of the name is lowercase, and each
> letter that starts a new 'word' is capitalized.
>
> Good:
> 'connect()'
> 'getData()'
> 'buildSomeWidget()'
>
> Bad:
> 'get_Data()'
> 'buildsomewidget'
> 'getI()'
>
> [7] Classes should be given descriptive names. Avoid using
> abbreviations where
> possible. Each word in the class name should start with a capital
> letter,
> without underscore delimiters (CampelCaps starting with a capital
> letter).
> The class name should be prefixed with the name of the 'parent set'
> (e.g.
> the name of the extension).
>
> Good:
> 'Curl'
> 'FooBar'
>
> Bad:
> 'foobar'
> 'foo_bar'
>
> Tim Hunt
Now, Tim, why did you have to bring in **FACT** to refute his statement?
Spoilsport :-) !!
Shelly
Navigation:
[Reply to this message]
|