Newsgroups: comp.object,comp.lang.c++,comp.lang.ada,comp.lang.clos
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!psinntp!psinntp!psinntp!psinntp!merlin.hgc.edu!jcm
From: jcm@hgc.edu (James McKim)
Subject: Re: C++ not OOP? (Was: Language Efficiency
Message-ID: <1995May26.134900.14007@merlin.hgc.edu>
Sender: usenet@merlin.hgc.edu (Action News Central)
Organization: The Hartford Graduate Center
References: <GIROD.95May24144415@dshp01.trs.ntc.nokia.com> <3pvj95$5iv@Starbase.NeoSoft.COM> <rshapiro-2405951316220001@esb.bbn.com>
Date: Fri, 26 May 1995 13:49:00 GMT
Lines: 54
Xref: glinda.oz.cs.cmu.edu comp.object:31579 comp.lang.c++:130319 comp.lang.ada:30426 comp.lang.clos:3041

In article <rshapiro-2405951316220001@esb.bbn.com> rshapiro@bbn.com (R Shapiro) writes:
>In article <3pvj95$5iv@Starbase.NeoSoft.COM>, timd@Starbase.NeoSoft.COM
>(Loki) wrote:
>>>(1) means that types are the syntactic element by which the programmer
>>>expresses the semantics he intends to his tools. That is, to me,
>>>programming IS declaring types.
>>
>>Well, at least, that's what *Object-Oriented* Programming is...
>
>
>No, the type-centric point of view is pre-oop. Classical oop is
>method-centric; it's about *behavior*, not types. Classes are a means, a
>clean way to encapsulate and organize behaviors, along with whatever
>supporting structure is necessary; they're not the end. 
>
>An experienced oop-programmer doesn't ask, as the central question about
>an object, "What kind of thing is this", s/he asks "What behaviors does
>this thing support".

Well, this is, pardon the expression, just a matter of semantics, isn't it?
To me a type is more than a name, it is, in fact, a specification of 
_behavior_. If an object is of type INTEGER it supports very different
behavior than an object of type STACK.

>                    In classical oop, it rarely matters what the type of
>a thing is; all that matters is what it knows how to do. If I know the
>abstract semantics of behavior FOO and if can invoke a FOO on X,  what
>difference does it make what X is? Semantically, it makes no difference
>whatever, and in fact there may be excellent reasons why I would not want
>to assume anything about what it is.

Again, I would say this just the other way around. If you know the
abstract semantics of behavior of all the invokable features of X then
you know X's type. Whether you've given that type a name in the context of
a programming language is irrelevant.

>
>A language may have good reasons to *force* me, at the syntactic level, to
>worry about types of variables. But that has nothing to do with oop.

Agreed. At least it has nothing to do with oop in the abstract.

>
>-- 
>rs/rshapiro@bbn.com or macrshap@bbn.com


Hope this helps,
-- Jim
-- 

*------------------------------------------------------------------------------*
Jim McKim  (203)-548-2458     Co-editor of Eiffel Outlook 
Internet:  jcm@hgc.edu        Subscribe early and often!
