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

This commit is contained in:
Varriount 2014-07-29 13:44:50 -07:00
parent 57cc6fcb5e
commit a902e6d854
1 changed files with 7 additions and 5 deletions

View File

@ -26,11 +26,12 @@ Style Guidelines
code is more consistant across editors. Unlike spaces, tabstop width varies code is more consistant across editors. Unlike spaces, tabstop width varies
across editors, and not all editors provide means of changing this width. across editors, and not all editors provide means of changing this width.
- Use of extra whitespace for alignment in ways other than dictated by the - Although use of whitespace for stylistic reasons other than the ones endorsed
style guide is discouraged. Manual alignment and re-alignment of code is by this guide are allowed, careful thought should be put into such practices.
tedious, and not all editors have support for auto-alignment of code Not all editors support automatic alignment of code sections, and re-aligning
sections, plus re-alignment of code blocks causes larger, less distinct long sections of code by hand can quickly become tedius. Furthermore, the large
code diffs. changes that re-alignment causes can make it harder to view actual,
program-altering changes when diffs are viewed.
```nimrod ```nimrod
# This is bad, as the next time someone comes # This is bad, as the next time someone comes
# to edit this code block, they # to edit this code block, they
@ -38,6 +39,7 @@ Style Guidelines
type type
WordBool* = int16 WordBool* = int16
CalType* = int CalType* = int
... # 5 lines later
CalId* = int CalId* = int
LongLong* = int64 LongLong* = int64
LongLongPtr* = ptr LongLong LongLongPtr* = ptr LongLong