Expand comment about why P.3 'bad' code is unclear, closes #2058

This commit is contained in:
Herb Sutter
2023-04-13 14:42:41 -07:00
parent 3c90d590e1
commit 89a20b2cc8

View File

@@ -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: 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 draw_line(Point, Point); // clearer
##### Enforcement ##### Enforcement