diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2017-03-15 21:48:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 21:48:46 +0100 |
commit | 19c436ab20ff1749455ef1606b0884387cb21f5e (patch) | |
tree | 8ee56ed9f159a714df350495b750fceeb1fa6e9b /doc | |
parent | 518696f3a75744b8b79924b8bcd053123812a76d (diff) | |
download | Nim-19c436ab20ff1749455ef1606b0884387cb21f5e.tar.gz |
Update nep1 to show type keyword on its own line
Diffstat (limited to 'doc')
-rw-r--r-- | doc/nep1.rst | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/doc/nep1.rst b/doc/nep1.rst index 11fd58dd4..a2d7ab3f3 100644 --- a/doc/nep1.rst +++ b/doc/nep1.rst @@ -81,7 +81,8 @@ changed in the future. var aVariable = "Meep" - type FooBar = object + type + FooBar = object For constants coming from a C/C++ wrapper, ALL_UPPERCASE are allowed, but ugly. (Why shout CONSTANT? Constants do no harm, variables do!) @@ -99,25 +100,28 @@ changed in the future. - Exception and Error types should have the "Error" suffix. .. code-block:: nim - type UnluckyError = object of Exception + type + UnluckyError = object of Exception - Unless marked with the `{.pure.}` pragma, members of enums should have an identifying prefix, such as an abbreviation of the enum's name. .. code-block:: nim - type PathComponent = enum - pcDir - pcLinkToDir - pcFile - pcLinkToFile + type + PathComponent = enum + pcDir + pcLinkToDir + pcFile + pcLinkToFile - Non-pure enum values should use camelCase whereas pure enum values should use PascalCase. .. code-block:: nim - type PathComponent {.pure.} = enum - Dir - LinkToDir - File - LinkToFile + type + PathComponent {.pure.} = enum + Dir + LinkToDir + File + LinkToFile - In the age of HTTP, HTML, FTP, TCP, IP, UTF, WWW it is foolish to pretend these are somewhat special words requiring all uppercase. Instead tread them as what they are: Real words. So it's ``parseUrl`` rather than ``parseURL``, ``checkHttpHeader`` instead of ``checkHTTPHeader`` etc. |