nep1: use subjectVerb, not verbSuject (#14732)

This commit is contained in:
Timothee Cour
2020-06-19 14:38:43 -07:00
committed by GitHub
parent ac8ab4c549
commit 79c90b30ee

View File

@@ -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.