<<< | Index | >>> |
A reference is like a pointer, except:
Usage syntax is like an object.
References always refer to something.
References can't be reassigned to something else.
This is enforced by:
Requiring initialization in case of variables.
The implicit reference initialization in case of function parameters.
No syntax exists to changing the referent
(object that a reference is pointing to).
Once instantiated, the reference becomes eternal synonym
for an object or a variable.
<<< | Index | >>> |