authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-08-11 21:13:02-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-08-11 21:13:02-07:00
log0a482bbbfe1dbabaab6b7a5c26ec4f29f0c618d9
tree1318605d365b86740b084efdbad95fdca3babdac
parent2ed949a6ae053262ee563b198a8758ba82f50e84

add style guide


1 files changed, 16 insertions(+), 0 deletions(-)

doc/style.md created+16
......@@ -0,0 +1,16 @@
1# Official Style Guide
2
3These conventions are not enforced by the compiler, but they are shipped in
4this documentation along with the compiler in order to provide a point of
5reference, should anyone wish to point to an authority on agreed upon Zig
6coding style.
7
8 * 4 space indentation
9 * `camelCaseFunctionName`
10 * `TitleCaseTypeName`
11 * `snake_case_variable_name`
12 * Open braces on same line, unless you need to wrap.
13 * If a list of things is longer than 2, put each item on its own line and
14 exercise the abilty to put an extra comma at the end.
15
16See Zig standard library for examples.