RST backtick refactor (all *.rst except manual.rst and rst_examples.rst) (#17258)
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
This commit is contained in:
parent
15586c7a7a
commit
83ae70cb54
30 changed files with 1402 additions and 1350 deletions
30
doc/apis.rst
30
doc/apis.rst
|
|
@ -1,3 +1,5 @@
|
|||
.. default-role:: code
|
||||
|
||||
=================
|
||||
API naming design
|
||||
=================
|
||||
|
|
@ -18,22 +20,22 @@ been renamed to fit this scheme. The ultimate goal is that the programmer can
|
|||
------------------- ------------ --------------------------------------
|
||||
English word To use Notes
|
||||
------------------- ------------ --------------------------------------
|
||||
initialize initT ``init`` is used to create a
|
||||
value type ``T``
|
||||
new newP ``new`` is used to create a
|
||||
reference type ``P``
|
||||
initialize initT `init` is used to create a
|
||||
value type `T`
|
||||
new newP `new` is used to create a
|
||||
reference type `P`
|
||||
find find should return the position where
|
||||
something was found; for a bool result
|
||||
use ``contains``
|
||||
contains contains often short for ``find() >= 0``
|
||||
append add use ``add`` instead of ``append``
|
||||
use `contains`
|
||||
contains contains often short for `find() >= 0`
|
||||
append add use `add` instead of `append`
|
||||
compare cmp should return an int with the
|
||||
``< 0`` ``== 0`` or ``> 0`` semantics;
|
||||
for a bool result use ``sameXYZ``
|
||||
put put, ``[]=`` consider overloading ``[]=`` for put
|
||||
get get, ``[]`` consider overloading ``[]`` for get;
|
||||
consider to not use ``get`` as a
|
||||
prefix: ``len`` instead of ``getLen``
|
||||
`< 0` `== 0` or `> 0` semantics;
|
||||
for a bool result use `sameXYZ`
|
||||
put put, `[]=` consider overloading `[]=` for put
|
||||
get get, `[]` consider overloading `[]` for get;
|
||||
consider to not use `get` as a
|
||||
prefix: `len` instead of `getLen`
|
||||
length len also used for *number of elements*
|
||||
size size, len size should refer to a byte size
|
||||
capacity cap
|
||||
|
|
@ -44,7 +46,7 @@ delete delete, del del is supposed to be faster than
|
|||
delete, because it does not keep
|
||||
the order; delete keeps the order
|
||||
remove delete, del inconsistent right now
|
||||
remove-and-return pop ``Table``/``TableRef`` alias to ``take``
|
||||
remove-and-return pop `Table`/`TableRef` alias to `take`
|
||||
include incl
|
||||
exclude excl
|
||||
command cmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue