Re: TRM - Morbidity has set in, or not?

From: Tony D <tonyisyourpal_at_netscape.net>
Date: 22 May 2006 15:22:49 -0700
Message-ID: <1148336569.070957.127750_at_g10g2000cwb.googlegroups.com>


Now Marshall, you've made me go re-read a bit of a book, and I don't like doing revision ;)

Marshall wrote:
> Well, see, that's not right. "Message passing" is method invocation
> is function invocation (with a distinguished argument.) The fact
> that the term "message passing" makes it *appear* to be something
> different is a flaw, not a benefit. It creates a difference where
> none exists. That is obscuring, not illuminating.
>

I'm checking with Bruce MacLennan's Principles of Programming Languages, and the comment that has always stuck in my mind is ...

"In a conventional language, programs are active and data elements are passive; the program elements act on the the data elements. In an object-oriented language like Smalltalk, the data elements are active; they respond to messages that cause them to act on themselves, prehaps modifying themselves, perhaps modifying or returning other objects. Another way of saying this is that conventional languages are function oriented; things are accomplished by passing objects to functions. In an object-oriented language, things are accomplished by sending messages to objects."

Whether this is all true or not, back in the day (and this was almost 20 years ago) I was keen to work out what the fuss about OO was. Read on ...

[ snippage ]

> > It depends how valuable the
> > tenets of object oriented programming are to you.
>
> The big wins in OOPLs seems to me to be
> 1) easy creation of new types
> 2) modularity
>

Well see, that's why I was trying to work out what the fuss was about. When I was at uni, I couldn't work out what you could do with these fancy OO languages that you couldn't do with, say, Modula-2. In Modula-2, you could have records with elements of type procedure, and the whole language was built around modular programming, so you could theoretically at least do lots of OO kind of stuff there. The only thing I could see that made a difference was the dynamic nature of objects referred to above; essentially, once you've instantiated an object it hangs around waiting to jump into action when a message is passed to it. Apart from that, it was still fancy assignment statement managing, so when I learned Prolog at about the same time OO just seemed utterly uninteresting ! Imagine, a language where you asked questions and left the computer to do the dirty, boring, tedious book-keeping stuff - lovely ! (I had pretty much lost interest in any kind of imperative programming by the time I bumped into Oberon-2 - the final nail in the coffin there was when Wirth dropped enumerated types in typical Wirthian style - a plausible, if not terribly convincing theoretical argument (in this case concerning automatic transfer of literals across scope) and a more convincing, thoroughly pragmatic and horrible practical argument (it makes the compiler more difficult !))

In passing, this dynamic nature is also another quibble of mine about object databases; if an object is essentially an active construct, what does it *mean*, *precisely*, to store or persist one in a database ?

[ snippety ]

> I think the importance of this issue is overblown. That there are a
> bazillion OOPLs going in slightly different directions is a creative
> advantage. Many things are being tried.
>

Alternatively :

You could try opening doors by hitting them with your head from a variety of angles. There would be lots of experiments, and you may learn interesting things, like the difference in strength between typical materials used for manufacturing doors and the human skull. These lessons, while valuable, will be painful.

Much better to sit back and reason about doors before starting.

>
> > I'm still dreaming of a language, much like Haskell, with relations as
> > first class citizens.
>
> Agreed!
>

Now that I'm thinking about Modula-2, I seem to remember a putative Modula-R, which was Modula-2 with relations. Was this ever implemented, or was it only a paper language ?

  • Tony
Received on Tue May 23 2006 - 00:22:49 CEST

Original text of this message