| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Clean Object Class Design -- Circle/Ellipse
"Bob Badour" <bbadour_at_golden.net> wrote in message
news:cd3b3cf.0110061710.60f86f60_at_posting.google.com...
> brangdon_at_cix.co.uk (Dave Harris) wrote in message
news:<memo.20011001000009.35593A_at_brangdon.madasafish.com>...
> > bbadour_at_golden.net (Bob Badour) wrote (abridged):
> > > Ask him to point to any Smalltalk language definition that defines
> > > "instance" as anything other than a variable which one can reference.
> >
> > The 1997 draft of the ANSI Smalltalk standard (which is the version of
the
> > standard I have to hand), says:
> >
> > A /variable/ is a computational entity that stores a single
> > reference (the /value/ of the variable) to an object.
> >
> > [...] An /object/ is a computational entity which is capable of
> > responding to a well defined set of messages. An object may
> > also encapsulate some (possibly mutable) state.
> >
> > This is *not* saying an object is a variable.
>
> "reference to an object" implies that "object" is variable.
Nope. It implies that the reference is the variable. It says nothing about the object itself.
> Values are
> self-identifying and one cannot reference a value. One can reference
> storage or memory that contains some representation of a value, but
> storage and memory are variable. That a variable is constrained to a
> single value for some period of time does not change its nature.
Even when that particular variable *cannot* change, i.e., is indistinguishable from a value. Well, you're consistent at least. Incomplete theory though.
> That's not to say that no such thing as an object value exists. Object
> value is an important concept just as object variable is an important
> concept.
Oh please, tell us more.
> If you had included a little more from the standard where it defines
> /message send/ and explains that "Each argument is a reference to an
> object", you would see that Smalltalk requires a variable in order to
> send a message. In other words, Smalltalk only pretends to have values
> and requires one to store a representation of a value in a variable
> prior to doing anything.
No again. Same point as above. The reference (attribute) is the variable. This says nothing about the object being referenced.
5 squared.
I just don't see the variable there. Unless, like you, I make one up and wrap it around the value 5 to make my theory consistent. But I question who is doing the pretending: you or Smalltalk.
>> > Later it says that when an object does have state, it represents it with
> > (The ANSI standard does not define "instance". It uses "object" instead.
One doesn't. One cannot change the SmallInteger 5.
>> > So sorry, but in Smalltalk the value 5 is an instance of the class
> > > An instance or variable can have the value 5. The value, however, is
> > > not an instance.
> >
>
I see your philosophy now. Values are only within God's domain. Everyone else must deal with representations.
> > > One cannot reference a value. Values are self-identifying.
> >
> > Indeed 5 is self-identifying. We can send a message to the value 5
whether
> > or not we have a variable referring to it.
>
No we haven't. We've been showing you examples of operations on values and you've been telling us we're fooling ourselves.
> Of course, the Smalltalk standard
> requires all implementations to operate only on variables.
Of course :-)
Luckily it allows me, the programmer, to pretend I'm actually
working with values.
> > > According to the definition of the Smalltalk language an instance is a
> > > variable that one can reference.
> >
> > Again, so sorry, but my reading of the ANSI definition of Smalltalk says
> > that an instance (or object) is something which responds to messages.
>
God's domain again. Thanks, I've got it now.
>
> > Perhaps you are talking about some other language, also called
Smalltalk?
>
And a religion. Received on Sat Oct 06 2001 - 22:37:03 CDT
![]() |
![]() |