diff options
-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. |