GNU coding standards: Difference between revisions

Content deleted Content added
Small cleanup
Move this paragraph to reception
Line 1:
{{No footnotes|date=September 2009}}
The '''GNU Coding Standards''' are a set of rules and guidelines for writing [[computer program|program]]s that work consistently within the [[GNU]] system. The GNU Coding Standards were written by [[Richard Stallman]] and other GNU Project volunteers. The standards document is part of the [[GNU Project]] and is available from the GNU website [https://www.gnu.org/prep/standards/]. Though it focuses on writing [[free software]] for GNU in [[C (programming language)|C]], much of it can be applied more generally. In particular, the GNU Project encourages its contributors to always try to follow the standards—whether or not their programs are implemented in C.
 
The [[Linux kernel]] strongly discourages this style for kernel code, and refers to the style pejoratively.<ref>{{cite web|url=https://www.kernel.org/doc/Documentation/CodingStyle|title=Linux kernel coding style|website=kernel.org|access-date=12 August 2016|quote=First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture.}}</ref> [[Steve McConnell]], in his book [[Code Complete]], also advises against using this style; he marks a code sample which uses it with a "Coding Horror" icon, symbolizing especially dangerous code, and states that it impedes readability.<ref>{{cite book |title=Code Complete: A practical handbook of software construction |last=McConnell |first=Steve |publisher=Microsoft Press |year=2004 |isbn=0-7356-1967-0 |___location=Redmond, WA |pages=746–747 |authorlink=Steve McConnell}}</ref>
 
==Code formatting==
Line 72 ⟶ 70:
 
There is one form of portability problem though, and that is the fact that the standard makes it clear that a program should run on different [[Central processing unit|CPU]] types. The standard says that GNU doesn't and won't support 16-bit systems, but handling all the different 32- and 64-bit systems is absolutely necessary.
 
== Reception ==
The GNU coding standards are primarily used by GNU projects, though is use is not limited to GNU projects alone.
 
The [[Linux kernel]] strongly discourages this style for kernel code, and refers to the style pejoratively.<ref>{{cite web|url=https://www.kernel.org/doc/Documentation/CodingStyle|title=Linux kernel coding style|website=kernel.org|access-date=12 August 2016|quote=First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture.}}</ref> [[Steve McConnell]], in his book [[Code Complete]], also advises against using this style; he marks a code sample which uses it with a "Coding Horror" icon, symbolizing especially dangerous code, and states that it impedes readability.<ref>{{cite book |title=Code Complete: A practical handbook of software construction |last=McConnell |first=Steve |publisher=Microsoft Press |year=2004 |isbn=0-7356-1967-0 |___location=Redmond, WA |pages=746–747 |authorlink=Steve McConnell}}</ref>
 
== See also ==