8 ms·
A reference looks like a value but is actually a point (de-references are automatic). Most high-level languages prefer references over pointers as they are hard
by seanmcdirmid 13y ago
A reference looks like a value but is actually a point (de-references are automatic). Most high-level languages prefer references over pointers as they are harder to screw up. E.g.
myref = otherref + 10
is equivalent to
* myptr = * otherptr + 10
Now, most languages also have a notion of values that are neither pointers nor references, and primitives generally are expressed as values, but hopefully you get the point.