Updated the new ES.3

Added xref, massaged summary.
pull/1739/head
Herb Sutter 5 years ago
parent 627ed66ce6
commit 520ac9c695

@ -9978,12 +9978,12 @@ Once the checking for overflow and error handling has been added that code gets
Not easy. ??? Look for messy loops, nested loops, long functions, absence of function calls, lack of use of non-built-in types. Cyclomatic complexity?
### <a name="Res-DRY"></a>ES.3: Don't repeat yourself, avoid redundant code
Duplicated or otherwise redundant code obscures intent and makes it harder to understand the logic. There are several other reasons to avoid redundant code. For example, it makes maintenance harder.
Use standard algorithms where apropriate, instead of writing some own implementation.
Duplicated or otherwise redundant code obscures intent, makes it harder to understand the logic, and makes maintenance harder, among other problems. It often arises from cut-and-paste programming.
**See also**: [SL.1](#Rsl-lib)
Use standard algorithms where apropriate, instead of writing some own implementation.
**See also**: [SL.1](#Rsl-lib), [ES.11](#Res-auto)
##### Example

Loading…
Cancel
Save