Re: An object-oriented network DBMS from relational DBMS point of view

From: Alfredo Novoa <alfredono_at_gmail.com>
Date: 19 Mar 2007 08:27:24 -0700
Message-ID: <1174318044.061853.8230_at_e65g2000hsc.googlegroups.com>


On 19 mar, 15:00, "Daniel" <danielapar..._at_gmail.com> wrote:

> > It does not specify whether the instance is a value or a variable.
>
> An instance of a type is a value, surely.

But in the Java spec it is a variable, so you would agree that their definitions are not very good.

> > In the book, class is a kind of type, so object could mean value, but
> > it also says:
>
> > "The reference values (often just references) are pointers to these
> > objects"
>
> > You can not point to a value.
>
> The sentence has a context, it presumes a memory model, you can point
> to the location in memory in which the value resides.

They are calling objects to variables.

> > A class instance creation expression creates a variable. Values canīt
> > be created.
>
> What does that mean, though, in the context of compound types?
> Consider the lowly record, a smple aggregate of fields. You would
> agree that it's meaningful to talk about creating an instance of a
> record type,

If the instance is a variable then I agree, if not, I disagree.

> and that that instance is a value?

Values can not be created, they don't have place in time or space.

> > So it is clear that some objets are variables, but what about the
> > values
> > holded by the variables?
>
> The values are the objects.

So the values holded by the objects are "the objects". Very OO.

> In the context of the Java memory model, you need a reference to them
> in order to do anything with them. So you have a reference (pointer)
> to an object, stored in a variable.

No, you have a pointer variable that holds a pointer to a variable that holds a value.

> So an object, like an instance of a record, is a value.

Then the Java spec is incoherent.

> In either
> case, though, any particular value is not very interesting. In the
> case of objects, OO people talk about the value of the reference as
> representing the identity of the object,

A very bad terminology. The identity of a value is the value itself and not a pointer.

Imagine that you are pointing to a box which contains a stone (an object) with a laser pointer. Is the laser beam the identity of the stone?

> if a property of the object
> is mutated,

Values are immutable, this is more than enough to completely invalidate your point.

But a variable might hold different values, your objects look like variables.

> it's still the "same" object, in some sense.

If you change the stone in the box by another stone, is it the same stone in some sense?

Regards Received on Mon Mar 19 2007 - 16:27:24 CET

Original text of this message