Move things from whitespace faq here
This commit is contained in:
parent
61317f1d73
commit
a895f47ffa
|
@ -99,9 +99,14 @@ be changed in the future.
|
||||||
<br></br>
|
<br></br>
|
||||||
### Coding Conventions ###
|
### Coding Conventions ###
|
||||||
- The 'return' statement should only be used when it's control-flow properties
|
- The 'return' statement should only be used when it's control-flow properties
|
||||||
are required. Use a procedures implicit 'result' variable instead. Using the
|
are required. Use a procedures implicit 'result' variable instead. This improves
|
||||||
implicit result variables allows both the Nimrod compiler and its various
|
readably.
|
||||||
backends to perform special optimizations
|
|
||||||
|
- Prefer to return `[]` and `""` instead of `nil`, or throw an exception if that
|
||||||
|
is appropriate.
|
||||||
|
|
||||||
|
- Use a proc when possible, only using the more powerful facilities of macros,
|
||||||
|
templates, iterators, and converters when necessary.
|
||||||
|
|
||||||
- Use the 'let' statement (not the var statement) when declaring variables
|
- Use the 'let' statement (not the var statement) when declaring variables
|
||||||
that do not change within their scope. Using the let statement ensures that
|
that do not change within their scope. Using the let statement ensures that
|
||||||
|
|
Loading…
Reference in New Issue