| ... | @@ -7134,6 +7134,18 @@ coding style. | ... | @@ -7134,6 +7134,18 @@ coding style. |
| 7134 | cannot be any more specific without being incorrect.</p> | 7134 | cannot be any more specific without being incorrect.</p> |
| 7135 | {#header_close#} | 7135 | {#header_close#} |
| 7136 | | 7136 | |
| | 7137 | {#header_open|Refrain from Underscore Prefixes#} |
| | 7138 | <p>In some programming languages, it is common to prefix identifiers with underscores |
| | 7139 | {#syntax#}__like_this{#endsyntax#} to indicate some vague notion of privacy or danger |
| | 7140 | associated with usage of the identifier.</p> |
| | 7141 | <p>In Zig, there are no private fields, and it is better not to pretend |
| | 7142 | otherwise. Fields should be named carefully to communicate their |
| | 7143 | semantics and documentation should indicate how to use fields without |
| | 7144 | violating data invariants. Underscore prefixes serve only to make code |
| | 7145 | authors feel better about writing clumsy, overly prescriptive, poorly |
| | 7146 | documented code.</p> |
| | 7147 | {#header_close#} |
| | 7148 | |
| 7137 | {#header_open|Whitespace#} | 7149 | {#header_open|Whitespace#} |
| 7138 | <ul> | 7150 | <ul> |
| 7139 | <li> | 7151 | <li> |