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

This commit is contained in:
Varriount 2014-07-19 19:49:07 -07:00
parent d2e4a708a1
commit 57cc6fcb5e
1 changed files with 0 additions and 6 deletions

View File

@ -64,7 +64,6 @@ be changed in the future.
type FooBar = object
```
<br>
- When naming types that come in value, pointer, and reference varieties,
use a regular name for the variety that is to be used the most, and add
@ -75,13 +74,11 @@ be changed in the future.
handle = int64 # Will be used most often
handleRef = ref handle # Will be used less often
```
<br>
- Exception and Error types should have the "Error" suffix.
```nimrod
type unluckyError = object of E_Base
```
<br>
- Unless marked with the `{.pure.}` pragma, members of enums should have an
identifying prefix, such as an abbreviation of the enum's name. Since
@ -121,7 +118,6 @@ be changed in the future.
wordyTupleMemberTwo: int
wordyTupleMemberThree: double
```
<br>
- Similarly, any procedure type declarations that are longer than one line
should be formatted in the style of a regular type.
@ -133,7 +129,6 @@ be changed in the future.
event: Event
)
```
<br>
- Multi-line procedure declarations/argument lists should continue on the same
column as the opening brace. This style is different from that of procedure
@ -145,7 +140,6 @@ be changed in the future.
proc lotsOfArguments(argOne: string, argTwo: int, argThree:float
argFour: proc(), argFive:bool): int
```
<br>
- Multi-line procedure calls should either have one argument per line
(like multi-line type declarations) or continue on the same