From 89a20b2cc82dbd3cdfda34d8c43368c4d3335765 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 13 Apr 2023 14:42:41 -0700 Subject: [PATCH] Expand comment about why P.3 'bad' code is unclear, closes #2058 --- CppCoreGuidelines.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 06dde4f..8dcbf8d 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -644,7 +644,9 @@ Some language constructs express intent better than others. If two `int`s are meant to be the coordinates of a 2D point, say so: - draw_line(int, int, int, int); // obscure + draw_line(int, int, int, int); // obscure: (x1,y1,x2,y2)? (x,y,h,w)? ...? + // need to look up documentation to know + draw_line(Point, Point); // clearer ##### Enforcement -- 2.11.4.GIT