Date: 09/12/00
- Next message: Egon Schmid: "[PHP-DOC] cvs: phpdoc /de/functions sockets.xml /en/functions sockets.xml"
- Previous message: Sterling Hughes: "Re: [PHP-DOC] cvs: phpdoc /en/functions sockets.xml"
- In reply to: Ron Chmara: "[PHP-DOC] Aliases for functions, and some "Official Function Naming Rules""
- Next in thread: Zak Greant: "Re: [PHP-DOC] Aliases for functions, and some "Official Function Naming Rules""
- Reply: Zak Greant: "Re: [PHP-DOC] Aliases for functions, and some "Official Function Naming Rules""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message -----
From: "Ron Chmara" <ron <email protected>>
Subject: [PHP-DOC] Aliases for functions, and some "Official Function Naming
Rules"
>
> Rules:
> RULE 1. Only major functions should be documented, functions which are
> typographic variants may be mentioned, but should not be documented
> as separate functions. They instead should be referenced in the
> parent function as an alias. Functions which have completely different
> names, however, should be documented as separate entries, for ease
> of reference.
Makes sense...
> RULE 2. Function names should be in all lowercase, with each word
> separated by an underscore. Care should be used to minimize the word
> count, and should include a parent name if they are part of a parent
> set.
This also makes complete sense. Although I would think that the only
functions that really need the parent name first are actual library
functions such as mcrypt, mysql, et. al., but thats not a big issue. I
personally hate mixed case functions and I find it unnerving to read someone
elses code that uses them. Although that's a personal preference, I imagine
it's shared my more than just a few people.
> RULE 3. Functions which are kept only for backwards compatibility should
be
> listed under their current parent names, and not documented as
> separate functions. Backwards compatible functions and documentation
> for them should be maintained as long as the code can be reasonably
> kept as part of the PHP codebase.
I too would like to see some functions removed over time. One great example
is chop(). There is an alias for it named rtrim() that matches another
actual function named ltrim(). Over time, chop should be replaced by rtrim
and then removed. It's confusing for Perl developers moving to PHP and it's
just a bad way to name a function in PHP.
- Next message: Egon Schmid: "[PHP-DOC] cvs: phpdoc /de/functions sockets.xml /en/functions sockets.xml"
- Previous message: Sterling Hughes: "Re: [PHP-DOC] cvs: phpdoc /en/functions sockets.xml"
- In reply to: Ron Chmara: "[PHP-DOC] Aliases for functions, and some "Official Function Naming Rules""
- Next in thread: Zak Greant: "Re: [PHP-DOC] Aliases for functions, and some "Official Function Naming Rules""
- Reply: Zak Greant: "Re: [PHP-DOC] Aliases for functions, and some "Official Function Naming Rules""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

