mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Simplified and unified sentence structure of the naming convention logic
This commit is contained in:
parent
07f50c0351
commit
4dcc8a80a9
@ -7105,10 +7105,12 @@ coding style.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
If {#syntax#}x{#endsyntax#} is a {#syntax#}type{#endsyntax#} (or {#syntax#}type{#endsyntax#} alias)
|
||||
then {#syntax#}x{#endsyntax#} should be {#syntax#}TitleCase{#endsyntax#}, unless it
|
||||
is a {#syntax#}struct{#endsyntax#} with 0 fields and is never meant to be instantiated,
|
||||
in which case it is considered to be a "namespace" and uses {#syntax#}snake_case{#endsyntax#}.
|
||||
If {#syntax#}x{#endsyntax#} is a {#syntax#}struct{#endsyntax#} with 0 fields and is never meant to be instantiated
|
||||
then {#syntax#}x{#endsyntax#} is considered to be a "namespace" and should be {#syntax#}snake_case{#endsyntax#}.
|
||||
</li>
|
||||
<li>
|
||||
If {#syntax#}x{#endsyntax#} is a {#syntax#}type{#endsyntax#} or {#syntax#}type{#endsyntax#} alias
|
||||
then {#syntax#}x{#endsyntax#} should be {#syntax#}TitleCase{#endsyntax#}.
|
||||
</li>
|
||||
<li>
|
||||
If {#syntax#}x{#endsyntax#} is callable, and {#syntax#}x{#endsyntax#}'s return type is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user