Updated NEP 1 : Style Guide for Nim Code (markdown)

This commit is contained in:
Flaviu Tamas 2015-01-11 13:34:44 -05:00
parent 54b8faabe9
commit d72cdf1b83
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ Style Guidelines
- Although use of whitespace for stylistic reasons other than the ones endorsed
by this guide are allowed, careful thought should be put into such practices.
Not all editors support automatic alignment of code sections, and re-aligning
long sections of code by hand can quickly become tedius.
long sections of code by hand can quickly become tedious.
```nimrod
# This is bad, as the next time someone comes
# to edit this code block, they
@ -47,14 +47,14 @@ Style Guidelines
Note: While the rules outlined below are the *current* naming conventions,
these conventions have not always been in place. Previously, the naming
conventions for identifiers followed the Pascal tradition of prefixes
which indicated the base type of the identifer - PFoo for pointer and reference
which indicated the base type of the identifier - PFoo for pointer and reference
types, TFoo for value types, EFoo for exceptions, etc. Though this has since
changed, there are many places in the standard library which still use this
convention. Such style remains in place purely for legacy reasons, and will
be changed in the future.
- Type identifiers should be in camelCase. All other identifiers should be in
CamelCase with the exception of constants which **may** use PascalCase but
camelCase with the exception of constants which **may** use PascalCase but
are not required to.
```nimrod
const aConstant = 42