diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-06-19 14:38:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 23:38:43 +0200 |
commit | 79c90b30ee5590b02f8bcfac68ed0c9ef7b38e7d (patch) | |
tree | afe4100eaa533397f9beb3ad1b908992194d2615 | |
parent | ac8ab4c54967a83d800655d9de42ece7d5e21c93 (diff) | |
download | Nim-79c90b30ee5590b02f8bcfac68ed0c9ef7b38e7d.tar.gz |
nep1: use subjectVerb, not verbSuject (#14732)
-rw-r--r-- | doc/nep1.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/nep1.rst b/doc/nep1.rst index 1ef8c3c24..35b1a1f62 100644 --- a/doc/nep1.rst +++ b/doc/nep1.rst @@ -101,11 +101,13 @@ changed in the future. fd: int64 HandleRef = ref Handle # Will be used less often -- Exception and Error types should have the "Error" suffix. +- Exception and Error types should have the "Error" or "Defect" suffix. .. code-block:: nim type - UnluckyError = object of Exception + ValueError = object of CatchableError + AssertionDefect = object of Defect + Foo = object of Exception # bad style, try to inherit CatchableError or Defect - Unless marked with the `{.pure.}` pragma, members of enums should have an identifying prefix, such as an abbreviation of the enum's name. @@ -147,6 +149,8 @@ changed in the future. an in-place version should get an ``-In`` suffix (``replaceIn`` for this example). +- Use `subjectVerb`, not `verbSubject`, eg: `fileExists`, not `existsFile`. + The stdlib API is designed to be **easy to use** and consistent. Ease of use is measured by the number of calls to achieve a concrete high level action. The ultimate goal is that the programmer can *guess* a name. |