@@ -165,9 +165,10 @@ AliasSeq!(int, string) tsi; // type sequence instance
165165
166166$(H3 $(LNAME2 pointers, Pointers))
167167
168- $(P A pointer to type $(D T) has a value which is a reference (address) to another
169- object of type $(D T). It is commonly called a $(I pointer to T) and its type is
170- `T*`. To access the object value, use the `*` dereference operator:
168+ $(P A pointer value is a memory address.
169+ A pointer to type $(D T) has a value which is a reference to an
170+ instance of type $(D T). It is commonly called a $(I pointer to T) and its type is
171+ `T*`. To access the pointed-to value, use the `*` dereference operator:
171172 )
172173
173174$(SPEC_RUNNABLE_EXAMPLE_RUN
@@ -184,21 +185,22 @@ assert(*p == 6);
184185---------
185186)
186187
187- $(P If a pointer contains a $(I null) value, it is not pointing to a valid object .)
188+ $(P If a pointer has a $(I null) value, it is not pointing to valid data .)
188189
189- $(P When a pointer to $(I T) is dereferenced, it must either contain a $(I null) value,
190- or point to a valid object of type $(I T).)
190+ $(P When a pointer to $(I T) is dereferenced, it must either have a $(I null) value,
191+ or point to a valid instance of type $(I T).)
191192
192193 $(IMPLEMENTATION_DEFINED
193194 $(OL
194195 $(LI The behavior when a $(I null) pointer is dereferenced. Typically the program
195- will be aborted.)
196+ will be aborted - $(DDSUBLINK spec/function, null-dereferences, that is required)
197+ in `@safe` code.)
196198 ))
197199
198200 $(UNDEFINED_BEHAVIOR dereferencing a pointer that is not $(I null) and does not point
199- to a valid object of type $(I T).)
201+ to a valid instance of type $(I T).)
200202
201- $(P To set a pointer to point at an existing object , use the
203+ $(P To set a pointer to point at an existing $(DDSUBLINK spec/expression, .define-lvalue, lvalue) , use the
202204 `&` *address of* operator:)
203205
204206$(SPEC_RUNNABLE_EXAMPLE_RUN
@@ -212,7 +214,14 @@ assert(*p == 2);
212214assert(i == 4);
213215---------
214216)
215- $(P See also $(DDSUBLINK spec/expression, pointer_arithmetic, Pointer Arithmetic).)
217+ $(P See also:)
218+ * $(DDSUBLINK spec/expression, pointer_arithmetic, Pointer Arithmetic)
219+ * $(DDSUBLINK spec/expression, slice_expressions, Pointer Slicing)
220+ * $(RELATIVE_LINK2 pointer-conversions, Pointer Conversions)
221+
222+ $(BEST_PRACTICE Use a $(DDSUBLINK spec/function, ref-params,
223+ `ref` function parameter) or a $(DDSUBLINK spec/declaration, ref-variables,
224+ `ref` local variable) when the address doesn't escape.
216225
217226
218227$(H2 $(LEGACY_LNAME2 User Defined Types, user-defined-types, User-Defined Types))
0 commit comments