summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-04 05:09:53 -0800
committerGitHub <noreply@github.com>2021-02-04 14:09:53 +0100
commit534a95aee02c7eb4ebc731431b31d82192025631 (patch)
tree1b6acb48d25d8af3a81d32c34070d46062842d54
parentcccf219cebfafbf1913dfdfdce70d285127bc440 (diff)
downloadNim-534a95aee02c7eb4ebc731431b31d82192025631.tar.gz
nep1: prefer `self` to `this` (#16927)
-rw-r--r--doc/nep1.rst11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/nep1.rst b/doc/nep1.rst
index 73e4d8433..e1d877816 100644
--- a/doc/nep1.rst
+++ b/doc/nep1.rst
@@ -162,10 +162,13 @@ to keep the names short but meaningful.
 -------------------     ------------   --------------------------------------
 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              initFoo        initializes a value type ``Foo``
+new                     newFoo         initializes a reference type ``Foo``
+                                       via ``new``
+this or self            self           for method like procs, e.g.:
+                                       `proc fun(self: Foo, a: int)`
+                                       rationale: `self` is more unique in english
+                                       than `this`, and `foo` would not be DRY.
 find                    find           should return the position where
                                        something was found; for a bool result
                                        use ``contains``
os <juancarlospaco@gmail.com> 2020-04-02 03:47:45 -0300 committer GitHub <noreply@github.com> 2020-04-02 08:47:45 +0200 Jsconsole update (#12448)' href='/ahoang/Nim/commit/lib/js/jsconsole.nim?h=devel&id=160d5fe589abd3878f56720bb764b82447e47b10'>160d5fe58 ^
693b2b0f5 ^
160d5fe58 ^

25ee55adf ^
160d5fe58 ^

f0308e9bc ^
160d5fe58 ^

f0308e9bc ^
160d5fe58 ^


f0308e9bc ^
160d5fe58 ^

f0308e9bc ^
160d5fe58 ^

f0308e9bc ^
160d5fe58 ^

693b2b0f5 ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
160d5fe58 ^

1ccf1b89c ^
b8658a3e2 ^





b725e0ed4 ^
b8658a3e2 ^





















9e1a2e9b6 ^







e4b64eee8 ^
9e1a2e9b6 ^

b8658a3e2 ^
1ccf1b89c ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125