diff --git a/doc/langref.html.in b/doc/langref.html.in index b3c5576ca7a9f11db9041e8fbd5685370aee2454..a6ef8fa53e5009fcefac82a11a4be47c7f85a962 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -7134,6 +7134,18 @@ coding style. cannot be any more specific without being incorrect.
{#header_close#} + {#header_open|Refrain from Underscore Prefixes#} +In some programming languages, it is common to prefix identifiers with underscores + {#syntax#}__like_this{#endsyntax#} to indicate some vague notion of privacy or danger + associated with usage of the identifier.
+In Zig, there are no private fields, and it is better not to pretend + otherwise. Fields should be named carefully to communicate their + semantics and documentation should indicate how to use fields without + violating data invariants. Underscore prefixes serve only to make code + authors feel better about writing clumsy, overly prescriptive, poorly + documented code.
+ {#header_close#} + {#header_open|Whitespace#}