diff --git a/Nimrod-Enhancement-Proposal-#1---Standard-Library-Style-and-Convention-Guidelines.md b/Nimrod-Enhancement-Proposal-#1---Standard-Library-Style-and-Convention-Guidelines.md new file mode 100644 index 0000000..fa56b6a --- /dev/null +++ b/Nimrod-Enhancement-Proposal-#1---Standard-Library-Style-and-Convention-Guidelines.md @@ -0,0 +1,34 @@ +Nimrod Enhancement Proposal #1 - Standard Library Style Guide + +Abstract +======== +Although Nimrod, through its flexible AST and case-sensitivity settings, +supports a variety of code and formatting styles, it is nevertheless beneficial +that certain community efforts, such as the standard library, should follow +a consistant set of style guidelines when suitable. This enhancement +proposal aims to list a series of guidelines that the standard library should +follow. Note that these are *guidelines* only. The nature of Nimrod being +as flexible as it is, there will be parts of this style guide that don't make +sense in certain contexts. Furthermore, just as +(Python's style guide)[http://legacy.python.org/dev/peps/pep-0008/] changes +over time, this style guide will too. + +Style Guidelines +================ + +General +------- +- All identifiers, except for types, should be in pascalCase. Type identifiers + Should be in CamelCase. + +- Members of enums should have an identifying prefix before their + names. For example, the PathComponent enum in the os module contains the + pcFile member, which, like the other members, has the 'pc' + (standing for PathComponent) prefix before its name. + +- Lines should be no longer than 80 characters + +- 2 spaces should be used for indentation. + +- The 'result' variable should be used whenever possible. 'return' should only + be used when it's flow control effects are needed. \ No newline at end of file