== Why is this an issue?

In 1978, Brian Kernighan and Dennis Ritchie published the first edition of The C Programming Language. This book, known to C programmers as "K&R", served for many years as an informal specification of the language. The version of C that it describes is commonly referred to as K&R C. 


The K&R function definition syntax introduced in the book was later deprecated in the ANSI C and ISO C standards. Even though the K&R syntax is still supported in the ISO C11 standard, it's not in ISO {cpp} standard versions and is not considered readable by most C/{cpp} developers today. 


=== Noncompliant code example

[source,cpp]
----
int foo(a, b)   // Noncompliant K&R C syntax
  int a;
  char* b;
{
}
----


=== Compliant solution

[source,cpp]
----
int foo(int a, char* b) { // Compliant
}
----



ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Move declarations of types of parameters for function into list of parameters.


'''
== Comments And Links
(visible only on this page)

=== on 20 Aug 2013, 00:04:47 Ann Campbell wrote:
I love the background in this one, but it's the only rule I've ever noticed like this. Is this kind of deviation desirable? When such background is available for other rules, do we want to include it?

=== on 20 Aug 2013, 06:44:43 Freddy Mallet wrote:
I think so Ann, indeed for me the goal of those rule descriptions is also to help developers learning some new stuff about their language, development environment, ... 

=== on 10 Sep 2013, 11:15:32 Evgeny Mandrikov wrote:
Should be noted that K&R style can be used only in function definition, but not in function declaration, which is another reason to not use it.

=== on 21 Apr 2015, 14:33:39 Evgeny Mandrikov wrote:
\[~ann.campbell.2] doesn't conform to RSPEC standards.

endif::env-github,rspecator-view[]
