| • Science | • People | • Locations | • Timeline |
The distinction from object is subtle but one can say that objects include references while values do not. References, however, are commonly expressed as values too, notably a pointer in C programming language. You may conclude that In C, therefore there is no difference between objects and values.
The use of a term value is useful in clarifying the exact meaning of assignments, copying, and comparison of objects. In the value model, for instance, objects itself are copied instead of references to it, they are treated as if they were numbers.
Some languages use the idea of l-value and r-value. L-values are values that have addresses, meaning they are variables or dereferenced references to certain place. R-value is either l-value or non-l-value — a term only used to distinguish from l-value. In C, the term l-value originally meant something that could be assigned (coming from left-value, indicating it was on the left side of the = operator), but since 'const' was added to the language, this now is termed a 'modifiable l-value'.