* [NR.4: Don't insist on placing each class declaration in its own source file](#Rnr-lots-of-files)
* [NR.5: Don't use two-phase initialization](#Rnr-two-phase-init)
* [NR.6: Don't place all cleanup actions at the end of a function and `goto exit`](#Rnr-goto-exit)
* [NR.7: Don't make all data members `protected`](#Rnr-protected-data)
* ???
### <aname="Rnr-top"></a>NR.1: Don't: All declarations should be at the top of a function
### <aname="Rnr-top"></a>NR.1: Don't insist that all declarations should be at the top of a function
##### Reason (not to follow this rule)
##### Reason
This rule is a legacy of old programming languages that didn't allow initialization of variables and constants after a statement.
Th "all declarations on top" rule is a legacy of old programming languages that didn't allow initialization of variables and constants after a statement.
This leads to longer programs and more errors caused by uninitialized and wrongly initialized variables.
##### Example, bad
@ -19964,9 +19964,9 @@ Unfortunately, compilers cannot catch all such errors and unfortunately, the bug
* [Always initialize an object](#Res-always)
* [ES.21: Don't introduce a variable (or constant) before you need to use it](#Res-introduce)
### <aname="Rnr-single-return"></a>NR.2: Don't: Have only a single `return`-statement in a function
### <aname="Rnr-single-return"></a>NR.2: Don't insist to have only a single `return`-statement in a function
##### Reason (not to follow this rule)
##### Reason
The single-return rule can lead to unnecessarily convoluted code and the introduction of extra state variables.
In particular, the single-return rule makes it harder to concentrate error checking at the top of a function.
@ -20034,15 +20034,16 @@ Also, this style is a temptation to use the [goto exit](#Rnr-goto-exit) non-rule
* Keep functions short and simple
* Feel free to use multiple `return` statements (and to throw exceptions).
### <aname="Rnr-no-exceptions"></a>NR.3: Don't: Don't use exceptions