Skip to content

Commit d76d8c3

Browse files
"do no harm"
a philosophical addition
1 parent 111dcfa commit d76d8c3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CppCoreGuidelines.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# <a name="main"></a>C++ Core Guidelines
22

3-
April 7, 2016
3+
April 17, 2016
44

55
Editors:
66

@@ -222,6 +222,14 @@ The rules are not value-neutral.
222222
They are meant to make code simpler and more correct/safer than most existing C++ code, without loss of performance.
223223
They are meant to inhibit perfectly valid C++ code that correlates with errors, spurious complexity, and poor performance.
224224

225+
The rules are not perfect.
226+
A rule can do harm by prohibiting something that is useful in a given situation.
227+
A rule can do harm by failing to prohibit something that enables a serious error in a given situation.
228+
A rule can do a lot of harm by being vague, ambiguous, unenforcable, or by enabling every solution to a problem.
229+
It is impossible to completely meet the "do no harm" criteria.
230+
Instead, our aim is the less ambitious: "Do the most good for most programmers";
231+
if you cannot live with a rule, object to it, ignore it, but don't water it down until it becomes meaningless.
232+
225233
## <a name="SS-force"></a>In.force: Enforcement
226234

227235
Rules with no enforcement are unmanageable for large code bases.

0 commit comments

Comments
 (0)