From: objsys@netcom.com (Bob Hathaway)
Newsgroups: comp.object
Subject: Re: Type Conformance and Inheritance (was O.M() versus M(O) notation)
Date: 21 Aug 92 02:18:25 GMT
Organization: Object Systems

In article <KERS.92Aug20120508@cdollin.hpl.hp.com>, kers@hplb.hpl.hp.com (Chris Dollin) writes:
>|>That's if you *assume* that the objects exists with the interface (etc). It's
>|>not a given, it's a choice.
>|
>|Not really.  The real world is made up of objects and they do possess
>|properties and attributes and etc.
>
>I'm sorry. It is this point on which we seem to have a fundamental
>disagreement -- or perhaps a terminology problem. This model of the world --
>that there are objects, and properties, etc -- is a nice friendly (but not
>universal) one. But you are giving primacy to matter clumped in ways
>appropriate to the senses which we possess, and the real world is much, much
>richer than your model allows.

The abstraction level can always be broken down (even dynamically) further
thru aggregation if the level is too high.  This always works even for your
shattered cup example.

>What is the OO interface of my cup? 

A spatial representation and the mass properties of the surface and object.
And maybe any forces it may be giving off.  If I want more detail, I could
get into molecular bonds as in molecular modeling.  Quite common, I believe.
What is your prefered interface anyway?

>If my cup is an object, what happens when I drop it and it breaks? 
Back to VR again.  Its bonds break and it falls apart into several pieces.

>Suppose the handel [Hallelujah!] comes off. Is the cup now one object? 
No, two.

>Has it changed state (lost the ``handle'' attribute, perhaps)? 
Obviously.

>And the handle -- is it now a separate object, 
Yes.

>and, if so, did it exist before (maybe the aforementioned attribute)? 
Yes, but it was molecularly bonded together with the rest of the cup.
Mass you know.

>If you take this view, suppose that the cup shatters into a
>lay-persons-million pieces. Where's the cup? From whence came the pieces?
Broken into its constituent parts.  The pieces came from its mass.

>I think it's easier to say here that the ``cup'' is an *abstraction*, a
>*model* of some part of the real world which behaves in a particular way. When
>I drop the cup, and it shatters, the abstract notion becomes inapplicable. The
>``object-ness'' of the cup is an illusion -- it resides in our models, not in
>the world.

Depends on your domain of discourse: RWM, MWM, or AWM.  The latter two
usually don't worry much about dynamics and space much.  But the former
does.

>How do you identify the objects? The interactions? Even the notion of
>``process'' is part of our *description* of the world.

But I still believe in an objective reality.  We may have trouble seeing it
but its there none the less.  Maybe I should take up theoretical physics 
again.  Maybe even solve the unified field theorem; then I'd have a strong
argument now wouldn't I;-)

>|Anyway, there are many ways of viewing this objective reality.  I'll
>|admit this may be disputable.
>
>On the contrary, I strongly agree that there are many ways of viewing the
>objective reality. But I don't regard the lexical coincidence (objective ~~
>object-ive) as particularly compelling argument.

You misunderstood me.  I meant the choise of the closest view to objective
reality is debatable.

>|>In the software reality, M can certainly be the doer; consider CLOS, for
>|>example, with generic functions rather than objects-that-know-how-to.
>|>
>|>In physical reality, doers are not "sent messages" that tell them how to
>|>change their state.
>|
>|Yes they do.  "Bob, go to the store" is a request for an action.

[Slight admission]
Ok, I've wondered about alternatives to the behavioral interface myself.
I may have jumped the gun here but I don't see better alternatives.  I
still question the lack of encapsulation, maybe its just a bias, maybe not.

>So you identify doers with intelligent (or do I mean sapient?) agents? But
>that makes a nonsense of your stack example -- I can talk to the dish-stack as
>much as I like, but nothing happens until I put the tray on the stack. Then it
>``pushes'' down. You may choose to say that's an action performed by the
>stack, but it seems to me that you'd say that just to keep the OO model going.

Actually, its physical dynamics working on aggregate objects.

>And a single example is hardly enough to justify such a sweeping statement.
>What message is sent to the clouds to tell them to rain? 
The event driven approach (as I discussed towards the end of my last
article) can handle this as a message.  Actually clouds are made up of
little drops of water, again breaking an object into a finer level of
aggregate parts seems to work well.

>What message to the clock, to tell it another second has passed? 
The little spring component or maybe the frequency of the crystal.
It seems to me there is always some form of contact, whether physical
or not and this contact can be modelled with OO methods.  I'm still
waiting for better way.

>What message to the river, to say ``flow downward!''?
Gravity, as given off by the earth object.

>What message to the atom of tritium, to say ``decay!''?
Its an active object that has this property.

>What message to the iron, to say ``To the magnet!''?
The magnetic waves come in contact with the object, the universe does the
rest.  This one isn't up to the object, whatever it decides.

>Now, you can tell me that there are indeed messages for these things. But if
>you do, I am likely to say that you have stretched the concept of ``message''
>so far that it no longer seems to say very much; if any physical interaction
>is a ``message'', then yes, perhaps your objects are real (and sub-atomic),
>but we may as well use the terminology of physics, not computer science.
Whats the alternative?  Discussions of alternatives would be constructive,
not just pointing out percieved differences with reality or even our ability
to determine a models closeness with it.

>|And doers don't just change state, they can perform actions or even just
>|think about things although you might refer to the latter as a state change
>|(but I still don't like connectionists (just kidding :-)) and they are
>|usually quite capable of inciting their own actions.
>
>So, at the very least, your objects are autonomous processes -- unlike the
>object models supported by Smalltalk, C++, and CLOS?
These are weak models.  Try Ada.

>|>Even the normal (English grammar) notions distinguish the
>|>doer (which performs the action) from the done-to (which suffers it).
>|
>|The many examples, such as the imperative request for me to go to the store,
>|show this not to make sense so again I'll have to dispute your logic and ask
>|for an elaboration.
>
>``Bob, break the cup!''. You -- Bob -- are the doer. The cup is done-to. (One
>of you is the object -- ha! -- and the other the subject of the sentence ``Bob
>breaks the cup'', but I can't recall which is which and the dictionary entry
>is sufficiently obscure that I can't tell from that, either. Bah.)

No.  The subject is the implied you.  In "Bob, break the cup", Bob is an 
independent element (as I previously pointed out), the implied subject is
you (a pronoun standing in for Bob), break is the action transitive verb
and the cup is its complement (or object).  The fact that the doer (Bob)
is pointed out first is clear.  There's also: "break the cup, Bob" and even
"break, Bob, the cup".

As for "Bob breaks the cup" this is not an imperative, it is a declarative
statement.  Want to go prolog programming today?  It describes an action
and isn't really good for algorithms; I think, but story telling maybe;-)
Experience actually.

>If objects are ``real'' -- if being an object is a property of the *world*,
>not of a *description* of the world -- then we'd all carve the world into the
>same set of objects, right? But I don't think we do.
I do.  We all can recognize and distinguish between pencils and people
since they have discernable properties and attributes.

>Better [point of view] for what? Look, my argument is primarily that *there is
>no best view* -- that you pick a descriptive technique that fits the problem
>and solution domains. The OO view is good for a class of systems, and I have
>no objection to *using* it *for that class*. I am not *advocating* a
>functional viewpoint, but I am advocating that it have equal status with other
>viewpoints -- that there's nothing *inherently* wrong with it.

For abstract problem solving maybe.  But since I believe in an objective
reality trying to better understand, model, and simulate it is worthwhile.

>(Incidentally, note that a ``bank account'' might well be an object in a
>program. Is there a ``bank account'' object in the real world? Well, yes, if
>you realise that a particular organisation is just as real as a cup. But bank
>accounts aren't ``natural objects'', they're invented ones, like theatre
>bookings and your employment contract.)

Sounds like a confusion between the RWM and an AWM or MWM.  Cups do exist,
organizations usually exist as abstractions or subjective views.

|>I've just ``give my cup a little push''. (I was taling to someone about
|>actions as objects, and how real they were, and this piece of idomatic English
|>just popped out.) It suggests that actions can be -- are -- objectified in
|>(some) natural language uses. Are they still not in the real world?
|
|No, they are not.  You as an object can push the cup.  If you design an
|artificial reality and can say ``give my cup a little push'' and it moves
|a little this is magic, not metaphor.

>The point here is that speakers (I generalise from an excellent example :-)
>*already* treat actions as real, as objects; it is *natural* for them. I know

This is the MWM where actions are obviously objects.  Again, we could just
be having a domain mixup problem here; I try to deal with all of them at once.

>I'm pushing the cup in my example. Suppose I have a metal cup and an
>interesting arrangement of electromagnets, such that when the current flows
>the cup is thrown several feet in the air. What pushes the cup? The magnets?

Their magnetic fields do since they come in contace with the object.

>Well, that's one view -- seems like magic to me, though. The magnetic field?
This is subjective; MW here.

>Yes, that'll do me -- but if only objects cam push, then the field is an
>object. It's invisible, inaudible, intangible (except to the cup) -- not the
>notion of object I would have thought was ``natural''.

Well its the universe again.  Since I've referred to it frequently, perhaps
I should elaborate on my model a little.  People hating physics can skip
this part.  There is a universe.  Space is like a container and time exists
in it as well, they are components of the universe.  Time and mass are
relative to the speed travelled within this universe.  Space is believed
to be curved, probably positively.  This means there may be Einstien-Rosen
bridges (worm-holes) in it.  For any good Star Trek model this must be
simulated.  And of course there are the theories for multiple universes.
If you didn't model the universe as an object (or pass it as a parameter,
ekkk) minus ten points because there may be many of them.  In fact,
the laws may even change from one part of the universe to the other meaning
the universe had better keep track.  You'd better link these universes
together, too.  Universes seem like an implicit self to me with its assorted
laws and contained matter/energy existing in (or even creating) space.
Maybe I'm not object-oriented enough, since matter may create the space
around it and may actually enforce the laws itself.  Anyway, this explains
your gravity and force field type of questions.

>The remark about artificial reality is, I think, irrelevant. 

It is the rule for RWMing; I don't see your point.

>|In our minds we have a notion of push but it is based on all the ways all the
>|different kinds of objects that can push other objects.  There must be a
>|pusher and almost always a pushee for push to work because this is the way it
>|works in reality.
>
>The notion of push is an abstraction, like the notion of cup. The actual push
>is real, as is the actual cup.

No the push doesn't exist in its own right, as does the cup.  The push can
be understood in terms of the interactions between the objects involved.
You're back to confusing a RWM with an MWM.

>|>Oddly enough, the stacks I know of in ``real life'', the archetypal push-down
>|>stack of restaurant trays, are incapable of pushing objects -- something else
>|>has to do the pushing.
>|
>|Then you know how to push the tray.  I think you're arguing either the
>|behavioral interface approach or the choice of interface.  If you want the
>|stack to be more like the stack you're referring to then make it an aggregate
>|of movable parts and then define the spatial relationships and dynamics of
>|the system; it'll work just fine.
>
>Yes, and there are no ``objects'' knowing what to do in this description; just
>plain objects and relationships.

The objects know their physical properties if you take away any abstractions.

>|And the aggregate parts do have properties and characteristics, too.  They
>|should be part of their interface to the world and not separated as with the
>|unencapsulated approach.
>
>Sorry, I'm lost. Are we talking about tray stacks or programmatic stacks now?
>And how come we've started talking about encapsulation -- a concept to be
>applied to *descriptions*, rather than an object in the real world?

RW stacks.  And the description should not give away any details not
pertinent to the the RW object involved.  And the RW object should know
its own properties, mass, spacial occupancy, forces exuded, etc.

>In my model the messages carry out the operations; the computer is
>transparent. [Actually, since I haven't presented a model, you can't say it
>isn;'t so, and I can't say it is.]

I meant that given:
  object msg ...
	 msg ...
the second form sure looks like the computer (not an object) is executing it.

>|Also, if I write an imperative algorithm without an explicit doer, such as:
>|  take this
>|  do that with it
>|  put this here
>|  do that
>|  you're done
>|
>|There is the implicit imperative you for each instruction.  If I now reuse
>|this component by following it myself, handing it to a robot to perform, or
>|whatever then self becomes the implicit receiver.  In OO any such imperatives
>|are considered with an implicit self making this algorithm *completely
>|reusable*.
>
>It doesn't need OO to make this reusable; all it takes is an implicit
>parameter, or an explicit one if you like.

OO has the implicit parameter as above but I'm not aware of any other
notation which does.

>|Notice that makes the receiver special (which it should be anyway)
>
>But Bob, that's exactly the point that's being argued -- should there *be* a
>receiver, specially marked? Not whether or not you *can* use that notation,
>and have ``receivers'' as a concept, but whether that's a *necessary* part of
>OO. If you take ``the receiver should be special'' as an axiom, of course its
>going to appear as a theorem. But PG (I think) and myself are saying that *we
>dispute your axiom* -- a distinguished receiver is not *necessary* and is not
>*sufficient* for object-oriented dispatch.

Please elaborate on "not sufficient".  And I think I've shown it is an
excellent model that always works.  Can you show another approach is better?

>Yes, if it works, it's OK. But is that *necessary*? If I wish to model without
>having distinguished receivers (as, for example, makes sense when doing
>arithmetic on generalised numbers), why should I use this unbalanced notation
>that makes one argument more ``important'' than the other?

OO still supports operators (including overloading), just look at C++.
This is an AWM, however.

>|Again, discerning the doer is more clear AND more reuasable AND closer to
>|reality.  Don't get this without discerning the receiver, huh?
>
>Well, it's only clearer if that's how the model works, it has sod-all to do
>with reusability, and it's only closer to reality if the portion of reality
>you're modelling is modelled that way.

Well, it is how the model works, it is reusable as shown with the implied self
as receiver (which you have yet to show in a consistent and complete way with
any other method), and the portions of reality are modelled that way!!!

>Shall I say this clearly? The *approach* I am arguing is *the acceptance of
>diversity* -- in both the world and our descriptive notations. You are
>insisting that actions are not real (not objects, and the real world consists
>of objects). Let me put this clearly: I think you're wrong, that you are
>excluding other approaches, despite their usefulness; and that this does not
>strengthen the naturalness of your approach, it weakens it.

I don't think so.  I think you've been skipping between the RW, RWMs, AWs,
AWMs, and MWs and MWMs all over the place.  I know that actions are objects
in mental worlds (among others) and I know that that functional approaches
(or any approach) may due for AWs and AWMs but I find it interesting that
the object-oriented approaches can still do for all of them and I've just
been wondering if the reverse is true.

>Diversity seems to have done pretty well in biological (``natural'') systems.
>Don't knock it.

I was only knocking it for the RW and RWM case.  The rest I at least consider
debatable.

>|>In the presence of multi-methods, why should one argument to a message send
>|>have a special syntactic position?
>|
>|Because it is the object performing some action, as is always the case in
>|the real world.
>
>Not with multi-methods, it isn't; that's the point.

Uh huh.  You're confusing lack of encapsulation with multiple-polymorphism
which as I've already stated is obvious and *should* always be present.
Thats my axiom.

>|>Well, "normal" OO languages (Smalltalk, C++, Simula) *do* only ``overload on
>|>the first parameter'' -- that is, the action that is performed is determined
>|>by the "message" and the (type of the) first parameter (the receiver), which
>|>may in consequence be granted special syntactic status.
>|
>|Smalltalk does so because it is statically typeless and C++ is statically
>|typed.  I consider both weak because of this.  And I'm not up on my
>|Simula.  The languages here obviously have O.M... notation and use
>|multi-methods, they always have.
>
>They *don't* have multi-methods. They *never* have. Bob, is it possible we
>have drastically different notions of what ``multi-method'' means? My notion
>is taken from CLOS, on which I'm no expert but I think I understand the
>basics.

I gave you a reference to Coplien (I though you read it already;-) and he
defines multi-methods as simply multiple-polymorphism (as we do).  This
means the status of the receiver is not considered important in the definition.
And I don't like hearing that multi-methods are a superset of OO dispatch.
They are much weaker from my point of view because they aren't encapsulated
within a class.  Please keep in mind we used to allow both forms and rejected
the idea because of poor protection.

>You think a simulated experience will answer questions about the real world
>and our descriptions of it?

Sure, if it works well.  Reject the design if it doesn't.

>|Yes, we can give attributes to a flock of birds even if thats not the way the
>|real world is broken up.  This is the subjective side, not the objective side
>|of objects.
>
>It's not that it's *subjective*, it's that it's *abstract*. (Subjective would
>suggest that it's private to the individual.) 

You're confusing AWs with MWs (to which I was referring).

bob
objsys@netcom.com
Newsgroups: comp.object