>>49
Here is what my C view on the same thing...
"A value is the /meaning/ of an object (considered as a particular
type). The key word here is /meaning/ - a 'value' is an
abstraction, an idea, not something that can be held in a
program, but a point in an abstract value space that follows
certain rules (eg, mathematical addition, etc).
It's true that bit patterns stored in objects are used to
represent values (again, under a particuilar type). However, the
value itself -- the "meaning" -- is something that does not
depend on any object for its existence: an unchanging, abstract
idea (such as, for example, the number 3).
When the Standard says an expression yields a certain value, what
that means is the program produces something whose "meaning" is
the same if the abstract value were stored into an object that
has the same type as that of the value. (All values in C
programs are effectively indexed by what type they are.) More
concretely, an expression like
21 + 21
yields the same value (ie, the same meaning) as is held by
the variable 'x' (an object) after
int x = 42;
Viewed from this perspective, what is produced by evaluating an
expression has the same meaning as some bit pattern stored in an
object. Because it has the same meaning, it is the same value.
To say that another way, objects do hold patterns of bits that
represent values, but values don't depend on objects for their
existence -- if something has the same meaning as a certain bit
pattern would if held in an object, then that is the same value
as the object would have, whether an object is present or not.
(As always, subject to the necessary qualifications about types.)
"