@@ -1192,51 +1192,25 @@ object inheritance syntax involving the `of` keyword:
1192
1192
the `vtptr ` magic produced types bound to `ptr ` types.
1193
1193
1194
1194
1195
- Type bound operations
1196
- =====================
1197
-
1198
- There are 4 operations that are bound to a type:
1199
-
1200
- 1. Assignment
1201
- 2. Moves
1202
- 3. Destruction
1203
- 4. Deep copying for communication between threads
1204
-
1205
- These operations can be *overridden * instead of *overloaded *. This means that
1206
- the implementation is automatically lifted to structured types. For instance,
1207
- if the type `T ` has an overridden assignment operator `= `, this operator is
1208
- also used for assignments of the type `seq[T] `.
1209
-
1210
- Since these operations are bound to a type, they have to be bound to a
1211
- nominal type for reasons of simplicity of implementation; this means an
1212
- overridden `deepCopy ` for `ref T ` is really bound to `T ` and not to `ref T `.
1213
- This also means that one cannot override `deepCopy ` for both `ptr T ` and
1214
- `ref T ` at the same time, instead a distinct or object helper type has to be
1215
- used for one pointer type.
1216
-
1217
- Assignments, moves and destruction are specified in
1218
- the `destructors <destructors.html >`_ document.
1219
-
1220
-
1221
- deepCopy
1222
- --------
1223
-
1224
- `=deepCopy ` is a builtin that is invoked whenever data is passed to
1225
- a `spawn `'ed proc to ensure memory safety. The programmer can override its
1226
- behaviour for a specific `ref ` or `ptr ` type `T `. (Later versions of the
1227
- language may weaken this restriction.)
1195
+ ..
1196
+ deepCopy
1197
+ --------
1198
+ `=deepCopy` is a builtin that is invoked whenever data is passed to
1199
+ a `spawn`'ed proc to ensure memory safety. The programmer can override its
1200
+ behaviour for a specific `ref` or `ptr` type `T`. (Later versions of the
1201
+ language may weaken this restriction.)
1228
1202
1229
- The signature has to be:
1203
+ The signature has to be:
1230
1204
1231
- .. code-block :: nim
1205
+ .. code-block :: nim
1232
1206
1233
- proc `=deepCopy`(x: T): T
1207
+ proc `=deepCopy`(x: T): T
1234
1208
1235
- This mechanism will be used by most data structures that support shared memory,
1236
- like channels, to implement thread safe automatic memory management.
1209
+ This mechanism will be used by most data structures that support shared memory,
1210
+ like channels, to implement thread safe automatic memory management.
1237
1211
1238
- The builtin `deepCopy ` can even clone closures and their environments. See
1239
- the documentation of `spawn <#parallel-amp-spawn-spawn-statement >`_ for details.
1212
+ The builtin `deepCopy ` can even clone closures and their environments. See
1213
+ the documentation of `spawn <#parallel-amp-spawn-spawn-statement >`_ for details.
1240
1214
1241
1215
1242
1216
Dynamic arguments for bindSym
0 commit comments