summary refs log tree commit diff stats
path: root/nimdoc/tester.nim
Commit message (Expand)AuthorAgeFilesLines
* [minor] give more friendly description (#18973)flywind2021-10-071-1/+1
* fix warnings/hints in nimdoc/tester.nim (#18083)Timothee Cour2021-05-301-5/+7
* gitutils: add diffStrings, diffFiles, and use it in testament to compare expe...Timothee Cour2021-04-301-1/+2
* fix #9102 docgen: sidebar now shows proc signatures instead of encoding (#16857)Timothee Cour2021-01-291-1/+1
* fix #8871 runnableExamples now preserves source code comments, litterals, and...Timothee Cour2020-05-281-0/+1
* fix #10731 ; `runnableExamples "-b:cpp --run:off": code` works (#14384)Timothee Cour2020-05-201-2/+3
* better run [feature] (#11709)Andreas Rumpf2019-07-111-4/+6
* Use the correct HTML file reference in "nim doc" generated idx files (#11326)Kaushal Modi2019-05-251-10/+53
* docgen: produce links for proc namesAraq2019-01-251-1/+2
* docgen: support markdown link syntax; enable markdown extensionsAraq2019-01-111-1/+1
* make documentation generator tests green againAraq2018-09-131-1/+1
* index generation for docgen knows about subdirectories; index knows about enu...Araq2018-09-131-1/+4
* added a test for 'nim doc'Andreas Rumpf2018-09-071-0/+29
/td>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
                                                     
                                                
 
                                                           
 





                                                                             
 

                                                                          
 







                                                                             
                                                                   
 href='#n38'>38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81



















                                                                              



                                                                   













                                                                             
                           
                                                                    






















                                                                           
                           










                             
                           
                           
                           

                              
                                                                             
==========
API design
==========

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


Naming scheme
=============

The library uses a simple naming scheme that makes use of common abbreviations
to keep the names short but meaningful. Since version 0.8.2 many symbols have
been renamed to fit this scheme. The ultimate goal is that the programmer can
*guess* a name.


-------------------     ------------   --------------------------------------
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``
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``
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``
length                  len            also used for *number of elements*
size                    size, len      size should refer to a byte size
capacity                cap
memory                  mem            implies a low-level operation
items                   items          default iterator over a collection
pairs                   pairs          iterator over (key, value) pairs
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
include                 incl
exclude                 excl
command                 cmd
execute                 exec
environment             env
variable                var
value                   value, val     val is preferred, inconsistent right
                                       now
executable              exe
directory               dir
path                    path           path is the string "/usr/bin" (for
                                       example), dir is the content of
                                       "/usr/bin"; inconsistent right now
extension               ext
separator               sep
column                  col, column    col is preferred, inconsistent right
                                       now
application             app
configuration           cfg
message                 msg
argument                arg
object                  obj
parameter               param
operator                opr
procedure               proc
function                func
coordinate              coord
rectangle               rect
point                   point
symbol                  sym
literal                 lit
string                  str
identifier              ident
indentation             indent
-------------------     ------------   --------------------------------------