[self-interest] Re: Method are not objects?
David Ungar
David.Ungar at Eng.Sun.COM
Fri Oct 27 08:32:16 UTC 2000
Hi, all.
I am just back from a trip and stumbled across this discussion.
I will have to read the later messages again to get the gist of the
examples and proposals, but for right now I would like to first,
thank Jecel for his informed explanations of Self. He really does
understand our culture. Second, let me add a minor point: another
reason for Self's treatment of methods is that I suspect that
non-meta method objects have no place in what I believe to be an
object-oriented programming language. That is why there is no syntax
in Self to access a method. You have to go meta, where you get to
break all kinds of encapsulation.
Why do I believe that methods are out of place? It is a different
view from functional languages, which revel in method manipulation.
But a method always does the same thing when you execute it. It has
no control. An object gets to decide what happens when you send it a
message. Blocks are interesting...because a block includes a "self"
it has a lot of autonomy, though perhaps not as much as an object. I
would have loved to eliminate blocks except that they take care of
control structures and control abstraction so neatly.
Of course, the paradox is that you still need methods somewhere, or
else nothing would ever happen. But that doesn't mean that they need
to be base-level reified, as opposed to meta-level reified. There is
an analogy to slots here.
One of my goals for Self was to create a language that was as
"object-oriented" as possible. That meant hewing as closely as
possible to a model with only objects and messages, not bits and
methods--just my particular perspective.
Many interesting languages are possible, especially if you approach
them with different values.
Hope this helps,
- Dave
--
David Ungar
Sun Microsystems Laboratories
(650) 336-2618
More information about the Self-interest
mailing list