Doc #10028 [Fbk->Opn]: Misleading/Incorrect Description of indentation style
| From: | mdirks at gulfstreamcoach dot com | Date: | Mon, 26 Feb 2007 14:29:46 +0000 |
| Subject: | Doc #10028 [Fbk->Opn]: Misleading/Incorrect Description of indentation style | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-9476@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=10028&edit=1
ID: 10028
User updated by: mdirks at gulfstreamcoach dot com
Reported By: mdirks at gulfstreamcoach dot com
-Status: Feedback
+Status: Open
Type: Documentation Problem
Package: Documentation
Operating System: [irrelevant]
PHP Version: Irrelevant
New Comment:
Um... it's not so much as having a "function" indentation style as it
is having *one* overall indentation style, or at least basing a
standard off one indentation style with minor variations upon said
style.
By coincidence, the rules for indentation concerning functions are
identical in BSD/Allman and K&R. However, your conditional blocks are
indented like K&R. Given this, the indentation style is *more
accurately* described as K&R and *not* BSD/Allman. Doing so will avoid
confusion stemming from the previously defined standards for the
indentation style on control structures conflicting with the standard
layed out in BSD/Allman for control structures.
Reference:
http://en.wikipedia.org/wiki/Indent_style
Previous Comments:
------------------------------------------------------------------------
[2007-02-23 16:26:55] mj at php dot net
So you basically both K&R and BSD/Allman both fit well for your
function definition style, no? I see no reason to change anything
then.
------------------------------------------------------------------------
[2007-02-06 12:29:24] mdirks at gulfstreamcoach dot com
more updates...
------------------------------------------------------------------------
[2007-02-06 12:27:06] mdirks at gulfstreamcoach dot com
updates...
------------------------------------------------------------------------
[2007-02-05 11:30:45] mdirks at gulfstreamcoach dot com
Description:
------------
You describe your indentation style as "BSD/Allman" on the function
definition page. In all actuality, placing the opening curly bracket on
the proceeding line for functions and classes is used in most of the
common indentation styles (K&R, BSD/Allman, BSD/KNF, etc.). Your
indentation style would probably be more properly described as K&R
(Kernighan and Ritchie) style.
Test script:
---------------
N/A
Expected result:
----------------
N/A
Actual result:
--------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=10028&edit=1