* Re: C++ not OOP? (Was: Language Efficiency
[not found] ` <3n0uvi$8jt@atlantis.utmb.edu>
@ 1995-04-19 0:00 ` Fernando Mato Mira
1995-04-19 0:00 ` Curtis Bass
1995-04-20 0:00 ` Matt Austern
` (4 subsequent siblings)
5 siblings, 1 reply; 37+ messages in thread
From: Fernando Mato Mira @ 1995-04-19 0:00 UTC (permalink / raw)
In article <3n0uvi$8jt@atlantis.utmb.edu>, Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
> > hear from a reliable source that it is a "pure OOPL". What conclusions
> > can you draw about this language that would tell you whether it is
> > better suited to your purposes than, say, C+$, which is not a "pure
> > OOPL"?
>
> The conclusions that I would draw are:
>
> #1. All code must be attached to objects.
>
> i. I will not be able to write a procedure that
> is independent -- it must be attached to an object
No. This is Single-dispatch Fallacy #1.
Encapsulation problem is now solved, thanks to Craig Chambers..
> #2. All data must be encapsulated within objects.
Hm. Must be encapsulated, maybe. Within objects, I dunno..
--
F.D. Mato Mira http://ligwww.epfl.ch/matomira.html
Computer Graphics Lab matomira@epfl.ch
EPFL FAX: +41 (21) 693-5328
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-19 0:00 ` Fernando Mato Mira
@ 1995-04-19 0:00 ` Curtis Bass
1995-04-19 0:00 ` David Weller
0 siblings, 1 reply; 37+ messages in thread
From: Curtis Bass @ 1995-04-19 0:00 UTC (permalink / raw)
matomira@di.epfl.ch (Fernando Mato Mira) wrote:
-- snip --
> > i. I will not be able to write a procedure that
> > is independent -- it must be attached to an object
>
> No. This is Single-dispatch Fallacy #1.
> Encapsulation problem is now solved, thanks to Craig Chambers..
If I can write a procedure that is NOT attached to an object,
then I am NOT using a "PURE" OOPL.
-- snip --
> F.D. Mato Mira http://ligwww.epfl.ch/matomira.html
Curtis Bass
Software Systems Specialist II
University of Texas Medical Branch
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-19 0:00 ` Curtis Bass
@ 1995-04-19 0:00 ` David Weller
1995-04-20 0:00 ` Curtis Bass
0 siblings, 1 reply; 37+ messages in thread
From: David Weller @ 1995-04-19 0:00 UTC (permalink / raw)
In article <3n3o9c$cud@atlantis.utmb.edu>,
Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
>If I can write a procedure that is NOT attached to an object,
>then I am NOT using a "PURE" OOPL.
>
Curtis, please cite the references you have used to gain this silly
notion.
--
Frustrated with C, C++, Pascal, Fortran? Ada95 _might_ be for you!
For all sorts of interesting Ada95 tidbits, run the command:
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
if u cn rd ths, u r gd enuf to chg to Ada :-)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-19 0:00 ` David Weller
@ 1995-04-20 0:00 ` Curtis Bass
1995-04-20 0:00 ` David Weller
1995-04-21 0:00 ` Robert Martin
0 siblings, 2 replies; 37+ messages in thread
From: Curtis Bass @ 1995-04-20 0:00 UTC (permalink / raw)
dweller@Starbase.NeoSoft.COM (David Weller) wrote:
>
> In article <3n3o9c$cud@atlantis.utmb.edu>,
> Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
> >If I can write a procedure that is NOT attached to an object,
> >then I am NOT using a "PURE" OOPL.
> >
> Curtis, please cite the references you have used to gain this silly
> notion.
#1. The fact that you dismiss this "notion" as "silly" proves
to me that your mind is made up, and that you are not
willing to listen, learn, or expand your horizons in any
way. If you wish to remain ignorant, then, obviously, I
cannot prevent it.
#2. I know what "pure" means, and I know what "object-oriented"
means. Also, I know what "paradigm," "structured," and
"model" mean. Ergo, I can state what "pure object-oriented
programming language" means, based on the definitional
building-blocks I already have at my disposal.
#3. I have seen the term "pure" used to describe languages
such as Actor, Smalltalk, and Eiffel in printed articles
in widely available trade magazines. However, I have no
intention of rummaging through all of my Dr. Dobbs and
Computer Language back issues in order to pacify you. I
don't remember which article or column, out of the hundreds
that are in those magazines, actually contain the reference,
nor do I care. I know what I know. If you decide to reject
it, then I couldn't care less. There are others in this
newsgroup who think that the distinction between "pure"
and "impure" OOPL's is minor. I do not. Who is right?
We ALL are. Or, in other words, Who Cares?
Someone asked, "Why is C++ an 'impure' OOPL?" I simply
answered his question. If you have problems with this,
then I am sorry. Really.
#4. What I WILL do is refer you to Grady Booch's FIRST edition
of "Object-Oriented Design with Applications," appendix A2,
page 474. I will NOT reprint the relevant text. Go look it
up yourself.
Curtis Bass
Software Systems Specialist II
University of Texas Medical Branch
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` Curtis Bass
@ 1995-04-20 0:00 ` David Weller
1995-04-20 0:00 ` Curtis Bass
1995-04-20 0:00 ` Robert Dewar
1995-04-21 0:00 ` Robert Martin
1 sibling, 2 replies; 37+ messages in thread
From: David Weller @ 1995-04-20 0:00 UTC (permalink / raw)
In article <3n5oup$g2s@atlantis.utmb.edu>,
Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
>dweller@Starbase.NeoSoft.COM (David Weller) wrote:
>>
>> In article <3n3o9c$cud@atlantis.utmb.edu>,
>> Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
>> >If I can write a procedure that is NOT attached to an object,
>> >then I am NOT using a "PURE" OOPL.
>> >
>> Curtis, please cite the references you have used to gain this silly
>> notion.
>
>[Moderate flames deleted]
Um, was it just me, or did Curtis shed more heat than light? All I"m
asking is for you to answer the question. I saw Grady's comments,
but I'd hardly consider that some kind of philosophical foundation.
I certainly wouldn't build a house on it (or even a doghouse :-)
Perhaps a better way to formulate it is: How do you defend syntactic
differences as somehow rendering something more "pure" than another?
--
Frustrated with C, C++, Pascal, Fortran? Ada95 _might_ be for you!
For all sorts of interesting Ada95 tidbits, run the command:
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
if u cn rd ths, u r gd enuf to chg to Ada :-)
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` David Weller
@ 1995-04-20 0:00 ` Curtis Bass
1995-04-21 0:00 ` Robert Martin
1995-04-21 0:00 ` Fernando Mato Mira
1995-04-20 0:00 ` Robert Dewar
1 sibling, 2 replies; 37+ messages in thread
From: Curtis Bass @ 1995-04-20 0:00 UTC (permalink / raw)
dweller@Starbase.NeoSoft.COM (David Weller) wrote:
>
> In article <3n5oup$g2s@atlantis.utmb.edu>,
> Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
> >dweller@Starbase.NeoSoft.COM (David Weller) wrote:
> >>
> >> In article <3n3o9c$cud@atlantis.utmb.edu>,
> >> Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
> >> >If I can write a procedure that is NOT attached to an object,
> >> >then I am NOT using a "PURE" OOPL.
> >> >
> >> Curtis, please cite the references you have used to gain this silly
> >> notion.
> >
> >[Moderate flames deleted]
>
> Um, was it just me, or did Curtis shed more heat than light? All I"m
> asking is for you to answer the question. I saw Grady's comments,
> but I'd hardly consider that some kind of philosophical foundation.
> I certainly wouldn't build a house on it (or even a doghouse :-)
Had you avoided the word "silly," you would have avoided the
heat. I don't like having my intelligence questioned. You can
question my views and opinions all you want, but if you start
condescending toward my intelligence level, you'd better be
wearing asbestos.
We are not discussing a "philosophical foundation," but simply
the difference(s) between "pure" and "hybrid" OOPL's. As I said
in my previous post, I was just answering another poster's
question re: why C++ is not "pure" in the OOP sense. You
obviously have a problem with this, and there is obviously
nothing I can do about it.
> Perhaps a better way to formulate it is: How do you defend syntactic
> differences as somehow rendering something more "pure" than another?
Listen, "pure" does NOT necessarily mean "good" or "holy" or
"righteous." Saying that C++ is not a "pure" OOPL is NOT
saying that C++ is "sinful" or "evil." No, pure (in this
context) simply means homogeneous, and "impure" simple means
heterogeneous, and this is WRT the programming model(s).
C++ DIRECTLY supports TWO models; Structured and Object-
Oriented, ergo, it is heterogenous, ergo, it is not purely
an OOPL. Smalltalk directly supports ONLY ONE paradigm:
Object-Oriented programming, ergo, it is homogeneous, ergo,
it is purely an OOPL. What I cannot fathom is why this
offends people, as if I am committing some sort of religious
heresy by saying these things.
Yes, yes, YES. I KNOW that you can "do procedural programming"
in Smalltalk. Who cares? Smalltalk STILL only supports the
Object-Oriented model directly. If you want to do procedural
programming, you should NOT use Smalltalk -- other languages
are better suited. If you INSIST on doing procdural programming
in Smalltalk, you can do it, but only by fighting the language
and not by working with the language. You have to attach your
procedures to an object -- there is no way around this. As Booch
says, "everything is an object" in Smalltalk -- there are no
procedures, only methods. You CAN do structured programming in
old-fashioned BASIC, but there are other languages that are
better suited. You can do spaghetti programming in Pascal,
but there are other languages that are better suited. All this
rambling means is this: Doing "procedural" programming in a
"pure" OOPL does NOT invalidate the definition of "pure," nor
does it make the distinction between "pure" and "hybrid" invalid.
If you had bothered to read my previous post, I admitted that
the distinction between "pure" and "hybrid" OOPL's may or may
not have any value to a person, and that I couldn't care less
one way or the other.
So, basically, there is nothing to "defend."
Curtis Bass
Software Systems Specialist II
University of Texas Medical Branch
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` Curtis Bass
@ 1995-04-21 0:00 ` Robert Martin
1995-04-21 0:00 ` Ed Osinski
1995-04-21 0:00 ` Fernando Mato Mira
1 sibling, 1 reply; 37+ messages in thread
From: Robert Martin @ 1995-04-21 0:00 UTC (permalink / raw)
Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
>Listen, "pure" does NOT necessarily mean "good" or "holy" or
>"righteous."
Do you really believe that? Come now. The word "pure" will always
have the connotation of "goodness". That's why it is used so often to
advertise toilet paper and douches.
>Saying that C++ is not a "pure" OOPL is NOT saying that C++ is
>"sinful" or "evil."
But that is the way it will be interpreted.
--
Robert Martin | Design Consulting | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com | Object Oriented Analysis
2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 | C++
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-21 0:00 ` Robert Martin
@ 1995-04-21 0:00 ` Ed Osinski
0 siblings, 0 replies; 37+ messages in thread
From: Ed Osinski @ 1995-04-21 0:00 UTC (permalink / raw)
In article <1995Apr21.192110.7609@rcmcon.com>, rmartin@rcmcon.com (Robert Martin) writes:
|> Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
|>
|> >Listen, "pure" does NOT necessarily mean "good" or "holy" or
|> >"righteous."
|>
|> Do you really believe that? Come now. The word "pure" will always
|> have the connotation of "goodness". That's why it is used so often to
|> advertise toilet paper and douches.
|>
|> >Saying that C++ is not a "pure" OOPL is NOT saying that C++ is
|> >"sinful" or "evil."
|>
|> But that is the way it will be interpreted.
I would have to agree. I wonder how strongly people would argue about
how something is "a pure object-oriented language" if "a pure" is replaced
with "just an".
|> Robert Martin | Design Consulting | Training courses offered:
|> Object Mentor Assoc.| rmartin@rcmcon.com | Object Oriented Analysis
|> 2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
|> Green Oaks IL 60048 | Fax: (708) 918-1023 | C++
--
---------------------------------------------------------------------
Ed Osinski
Computer Science Department, New York University
E-mail: osinski@cs.nyu.edu
---------------------------------------------------------------------
In the early years of the 16th century, to combat the rising tide of
religious unorthodoxy, the Pope gave Cardinal Ximinez of Spain leave
to move without let or hindrance throughout the land, in a reign of
violence, terror and torture that makes a smashing film. This was
the Spanish Inquisition...
-- Monty Python's Flying Circus
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` Curtis Bass
1995-04-21 0:00 ` Robert Martin
@ 1995-04-21 0:00 ` Fernando Mato Mira
1 sibling, 0 replies; 37+ messages in thread
From: Fernando Mato Mira @ 1995-04-21 0:00 UTC (permalink / raw)
In article <3n60kc$gki@atlantis.utmb.edu>, Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
> says, "everything is an object" in Smalltalk -- there are no
^^^^^^^^^^^^^^^^^^^^^^^
You got it. This is the definition of pure OO. Even your
control structures are objects.
If you look at Lisp, for example, it is definitely not pure because you have
normal non-virtual functions, control structures are not objects, etc.
However, all functions (even `dirty ones') are objects. Methods are objects
stored in a generic function. Methods contain specializer lists (objects),
which contain references to classes (or `eql specializers).
As you can see, in some sense the classes are `inside' the methods. Note
that this does not happen in a language like C or Pascal. So, in some
sense, it's a reverse world, and very object-oriented.
Also, CLOS can be even considered `not really object-oriented' because
of the lack of encapsulation. This has nothing to do with all the stuff
above, but with the lack of a better module system.
Cecil looks at object-orientedness very much like Ada, and CLOS, and
has solved the encapsulation problem in a great way.
You seem to be very concerned about philosophical issues, so if
you haven't done it yet, I would recommend you to take a look at CLOS and Cecil;
not necessarily to use them, but you should find it very stimulating
and I'm sure it'll open your mind to whole new perspectives on OO..
Regards,
PS: I'm not saying that Cecil is `pure'. But the same argument holds..
--
F.D. Mato Mira http://ligwww.epfl.ch/matomira.html
Computer Graphics Lab matomira@epfl.ch
EPFL FAX: +41 (21) 693-5328
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` David Weller
1995-04-20 0:00 ` Curtis Bass
@ 1995-04-20 0:00 ` Robert Dewar
1995-04-21 0:00 ` Curtis Bass
1 sibling, 1 reply; 37+ messages in thread
From: Robert Dewar @ 1995-04-20 0:00 UTC (permalink / raw)
when people argue about whether something is pure or not, they must have
ulterior motives. You can't believe that people put this much energy into
arguing about something that is just terminology.
what is going on here is the underlying reasoning
x is pure
pure is good
therefore x is good
at least this syllogism doesn't have a divided middle, but it's really
pretty thin! Why not argue about specific technical features, whose presence
or absence is objectively determinable, and then discuss why or why not
you think the features is a GOOD THING!
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` Robert Dewar
@ 1995-04-21 0:00 ` Curtis Bass
1995-04-21 0:00 ` Robert Dewar
0 siblings, 1 reply; 37+ messages in thread
From: Curtis Bass @ 1995-04-21 0:00 UTC (permalink / raw)
dewar@cs.nyu.edu (Robert Dewar) wrote:
>
> when people argue about whether something is pure or not, they must have
> ulterior motives.
Yeah, like setting the record straight . . .
Look, person A said that C++ wasn't a "pure" OOPL.
Person B asked "Why?"
Person C (me) answered person B's question -- CORRECTLY.
Everybody gets offended at this, as if person C blasphemed
against someone's god(s).
Why?
> ulterior motives. You can't believe that people put this much energy into
> arguing about something that is just terminology.
>
> what is going on here is the underlying reasoning
>
> x is pure
> pure is good
> therefore x is good
Nope, nope, nope, a thousand times, nope.
It's more like:
X is pure
Y is not pure
Therefore, it may be easier to do some
things in Y than it would in X. You CAN
do these things in X, but the result is
a bad implementation of X's paradigm.
You may be better off using Y. If you
need to use X's paradigm, then there
may be advantages to using X instead of
Y, but maybe not.
I repeat: Why do people take offense at this?
> at least this syllogism doesn't have a divided middle, but it's really
> pretty thin! Why not argue about specific technical features, whose presence
> or absence is objectively determinable, and then discuss why or why not
> you think the features is a GOOD THING!
The fact that Y directly supports multiple programming
paradigms IS a "technical feature." The fact that X does
NOT is ALSO a "technical feature."
There are pros and cons to both:
PRO: CON:
PURE: generally cleaner somewhat rigid,
implementation since only one
paradigm is
supported
simpler, more may require
consistent syntax retraining,
minimal skillset
reuse
IMPURE: allows the use of implementation
current paradigm may be complex,
skillset inelegant
generally more synatx is less
flexible consistent
etc.
Like all such issues, simply saying that "pure is good
and impure is bad" is simplistic and reveals ignorance
on the part of anyone making such a statement. It may
be useful to distinguish between the two, and it may
not, depending on the situation. Saying that the
distinction is universally useless is just as simplistic
and ignorant as saying "pure is good and impure is bad."
Curtis Bass
Software Systems Specialist II
University of Texas Medical Branch
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-21 0:00 ` Curtis Bass
@ 1995-04-21 0:00 ` Robert Dewar
0 siblings, 0 replies; 37+ messages in thread
From: Robert Dewar @ 1995-04-21 0:00 UTC (permalink / raw)
OK Curtis, then since we are just talking terminology, with no other kind
of motives, let's choose an unloaded word (you could after all choose a
loaded word on the other side, like restrictive). how about something
like "centered", which seems pretty neutral.
But somehow, I don't think people would put nearly as much energy into the
debate on either side if we were just asking whether C++ was object-centered
...
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-20 0:00 ` Curtis Bass
1995-04-20 0:00 ` David Weller
@ 1995-04-21 0:00 ` Robert Martin
1 sibling, 0 replies; 37+ messages in thread
From: Robert Martin @ 1995-04-21 0:00 UTC (permalink / raw)
>> Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> wrote:
>> >If I can write a procedure that is NOT attached to an object,
>> >then I am NOT using a "PURE" OOPL.
>> >
>dweller@Starbase.NeoSoft.COM (David Weller) wrote:
>> Curtis, please cite the references you have used to gain this silly
>> notion.
Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
>#4. What I WILL do is refer you to Grady Booch's FIRST edition
> of "Object-Oriented Design with Applications," appendix A2,
> page 474. I will NOT reprint the relevant text. Go look it
> up yourself.
Here it is:
[Speaking of Smalltalk] 'It is a "pure" object oriented
programming language, in that everything is viewed as an object -
even integers and classes.'
------
Notice how much emotion has been shed over this argument? The reason
is that "pure" is an emotionally charged word. The argument has
been made in this group, many times, that students would be better off
learning a "pure" OOPL, or that applications are better if programmed
in a "pure" OOPL.
What these arguments do not do, is what Grady did above. He defined
the term.
As it happens, I don't much care for Grady's definition. For one
thing, I don't understand the benefit of 'purity' as he describes it.
In fact, he was not claiming any such benefit to exist. For another,
I don't like coupling that definition with a word that carries such
emotional baggage.
--
Robert Martin | Design Consulting | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com | Object Oriented Analysis
2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 | C++
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
[not found] ` <3n0uvi$8jt@atlantis.utmb.edu>
1995-04-19 0:00 ` Fernando Mato Mira
@ 1995-04-20 0:00 ` Matt Austern
1995-04-21 0:00 ` Robert Martin
` (3 subsequent siblings)
5 siblings, 0 replies; 37+ messages in thread
From: Matt Austern @ 1995-04-20 0:00 UTC (permalink / raw)
In article <3n43p0$ehs@Starbase.NeoSoft.COM> dweller@Starbase.NeoSoft.COM (David Weller) writes:
> >If I can write a procedure that is NOT attached to an object,
> >then I am NOT using a "PURE" OOPL.
> >
> Curtis, please cite the references you have used to gain this silly
> notion.
Who needs a definition? It's apparently his definition of the word
"pure". Definitions are arbitrary; he can define the phrase
"pure object-oriented language" however he feels like.
The rest of us, of course, don't have to accept that the way he
distinguishes between "pure" and "impure" languages is a particularly
useful distinction. Personally, I don't. I think that this
distinction is almost completely trivial: whether or not functions
must always be attached to classes is an essentially syntactic issue.
--
Matt Austern matt@physics.berkeley.edu
http://dogbert.lbl.gov/~matt
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
[not found] ` <3n0uvi$8jt@atlantis.utmb.edu>
1995-04-19 0:00 ` Fernando Mato Mira
1995-04-20 0:00 ` Matt Austern
@ 1995-04-21 0:00 ` Robert Martin
1995-04-21 0:00 ` Curtis Bass
1995-04-21 0:00 ` Robert Martin
` (2 subsequent siblings)
5 siblings, 1 reply; 37+ messages in thread
From: Robert Martin @ 1995-04-21 0:00 UTC (permalink / raw)
Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
> iv. Since it is a pure OOPL, there is a great
> likelihood that the language itself is of
> a fairly simple and elegant design. OTOH,
> C+$ will probably be a very complex language,
> since it supports two different programming
> paradigms (structured and OO).
Then you think that Objective_C is "very complex" and Eiffel is "very
simple".
I submit that you are, without saying so, assuming that all hybrids
must be as complex as C++, and all non-hybrids must be as simple as
Smalltalk. That is quite a big assumption.
--
Robert Martin | Design Consulting | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com | Object Oriented Analysis
2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 | C++
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-21 0:00 ` Robert Martin
@ 1995-04-21 0:00 ` Curtis Bass
0 siblings, 0 replies; 37+ messages in thread
From: Curtis Bass @ 1995-04-21 0:00 UTC (permalink / raw)
rmartin@rcmcon.com (Robert Martin) wrote:
-- [post deleted] --
This is degenerating into testosterone-crazed posturing. All
I did was correctly answer someone's question. Why do you get
offended at this? Why do you strut around, trying to say that
YOUR view of the world is "better" than mine?
For the record, Grady Booch calls Smalltalk a "pure" OOPL.
Frankly, I prefer to adopt his view of the world rather than
yours.
> Robert Martin | Design Consulting | Training courses offered:
Curtis Bass
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
[not found] ` <3n0uvi$8jt@atlantis.utmb.edu>
` (2 preceding siblings ...)
1995-04-21 0:00 ` Robert Martin
@ 1995-04-21 0:00 ` Robert Martin
1995-04-21 0:00 ` Curtis Bass
1995-04-21 0:00 ` Ed Osinski
1995-04-21 0:00 ` Matt Austern
5 siblings, 1 reply; 37+ messages in thread
From: Robert Martin @ 1995-04-21 0:00 UTC (permalink / raw)
>pete@borland.com (Pete Becker) wrote:
>> Suppose you are evaluating a new language, say, C+#, and you
>> hear from a reliable source that it is a "pure OOPL". What conclusions
>> can you draw about this language that would tell you whether it is
>> better suited to your purposes than, say, C+$, which is not a "pure
>> OOPL"?
Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
>The conclusions that I would draw are:
> #1. All code must be attached to objects.
> i. I will not be able to write a procedure that
> is independent -- it must be attached to an object
This does not guarantee that the stucture of your procedures or your
objects will be in any way superior to those written in C+$. So of
what use it it?
> ii. It would behoove me to have an Object-Oriented
> Design (as opposed to a Structured Design) of
> the system before I start coding in C+#, because
> writing structured code will not be an option.
> (Yes, I can kludge it by having just one object,
> and attaching all of the code to that object, but
> the result technically would still not be an
> example of "structured programming," but would
> rather be an example of BAD OO programming).
Saying that it is BAD doesn't eliminate it as an option. In any case,
you could make the identical argument about C+$. It would behoove you
to have an object oriented design!
> iii. My programming team had better be fluent in OO
> concepts before using C+#, because there is no
> mechanism for writing structured C+# today, and
> gradually growing into Object-Oriented C+#
> tomorrow.
This is the same argument as number ii, just rephrased. In any case
it is just as true for C+$. Your programming team had better be
fluent in OO if they are going to implement an OOD.
> iv. Since it is a pure OOPL, there is a great
> likelihood that the language itself is of
> a fairly simple and elegant design. OTOH,
> C+$ will probably be a very complex language,
> since it supports two different programming
> paradigms (structured and OO).
I am sure that you cannot substantiate this claim.
> Also, with
> C+#, I can rest assured that the syntax is
> uniform (all procedures will have an object
> ID prefix).
What do you mean? A prefix? Do you mean that all procedures will
belong to an object? Isn't this your point i above?
> C+$ would allow me to have SOME
> procedures WITH an object ID prefix, and some
> WITHOUT one. This could lead to confusion for
> the maintenance programmers.
How?
> Also, such code
> would represent a rather messy, inelegant
> design, which would be less of an option in C+#.
Why? Are designs with nothing but objects always cleaner than designs
that sometimes have global functions? I'd like to see the proof of that.
> #2. All data must be encapsulated within objects.
> i. There will not be any variables that are global
> to the application, unless they reside in a
> "root" object. Even in this case, we can have
> more control over their scope and accessability
> than would be avalable in C+$. In C+$, any global
> variable we have would be accessable by ANY
> procedure we write. In C+#, this would not be
> the case.
Unless all procedures and data were in the same object. Then there is
no control at all.
> ii. I can create new data types more easiliy, by
> deriving them from existing data types, then
> changing only that which needs to be changed,
> and inhereting the rest of the functionality
> from the parent data type. Since C+$ is not
> a pure OOPL, then variables are not objects,
> and therefore I would not have this capability.
In C+$ you would have this ability with any kind of variable you
desired to have it with.
--
Robert Martin | Design Consulting | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com | Object Oriented Analysis
2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 | C++
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
[not found] ` <3n0uvi$8jt@atlantis.utmb.edu>
` (3 preceding siblings ...)
1995-04-21 0:00 ` Robert Martin
@ 1995-04-21 0:00 ` Ed Osinski
1995-04-21 0:00 ` Matt Austern
5 siblings, 0 replies; 37+ messages in thread
From: Ed Osinski @ 1995-04-21 0:00 UTC (permalink / raw)
In article <3n0uvi$8jt@atlantis.utmb.edu>, Curtis Bass <cbass%intmeds1.utmb@mhost.utmb.edu> writes:
|> pete@borland.com (Pete Becker) wrote:
|>
|> -- snip --
|>
|> > Suppose you are evaluating a new language, say, C+#, and you
|> > hear from a reliable source that it is a "pure OOPL". What conclusions
|> > can you draw about this language that would tell you whether it is
|> > better suited to your purposes than, say, C+$, which is not a "pure
|> > OOPL"?
|>
|> The conclusions that I would draw are:
|>
|> #1. All code must be attached to objects.
- snip -
|> iv. Since it is a pure OOPL, there is a great
|> likelihood that the language itself is of
|> a fairly simple and elegant design. OTOH,
|> C+$ will probably be a very complex language,
|> since it supports two different programming
|> paradigms (structured and OO). Also, with
|> C+#, I can rest assured that the syntax is
|> uniform (all procedures will have an object
|> ID prefix). C+$ would allow me to have SOME
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|> procedures WITH an object ID prefix, and some
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|> WITHOUT one. This could lead to confusion for
^^^^^^^^^^^^
I just want to point out that this is not necessarily true.
Ada95 is an example where *all* procedure calls, whether they
are 'methods' or not, look the same.
|> the maintenance programmers. Also, such code
|> would represent a rather messy, inelegant
|> design, which would be less of an option in C+#.
- snip -
|> Curtis Bass
|> Software Systems Specialist II
|> University of Texas Medical Branch
--
---------------------------------------------------------------------
Ed Osinski
Computer Science Department, New York University
E-mail: osinski@cs.nyu.edu
---------------------------------------------------------------------
In the early years of the 16th century, to combat the rising tide of
religious unorthodoxy, the Pope gave Cardinal Ximinez of Spain leave
to move without let or hindrance throughout the land, in a reign of
violence, terror and torture that makes a smashing film. This was
the Spanish Inquisition...
-- Monty Python's Flying Circus
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
[not found] ` <3n0uvi$8jt@atlantis.utmb.edu>
` (4 preceding siblings ...)
1995-04-21 0:00 ` Ed Osinski
@ 1995-04-21 0:00 ` Matt Austern
1995-04-22 0:00 ` Robert Martin
1995-04-22 0:00 ` David Weller
5 siblings, 2 replies; 37+ messages in thread
From: Matt Austern @ 1995-04-21 0:00 UTC (permalink / raw)
In article <1995Apr21.190040.7332@rcmcon.com> rmartin@rcmcon.com (Robert Martin) writes:
> What these arguments do not do, is what Grady did above. He defined
> the term.
>
> As it happens, I don't much care for Grady's definition. For one
> thing, I don't understand the benefit of 'purity' as he describes it.
What's really interesting is that the definition Curtis quoted isn't
the same as the one he's (implicitly) using! The definition he's
using is that a "pure" OOL is one in which it's impossible to define
functions that don't belong to objects. The one he quoted, though, is
that a "pure" OOL is one in which everything is an object.
I agree that "pure" is a loaded word and that we should stop using it.
However, I do see the benefits of having a language where classes and
basic built-in types and operating system resources are objects;
languages like that make it much easier to treat things consistently.
A well-designed class hierarchy that includes the basic types and
that's rooted in some class like Object or ANY can sometimes be quite
useful.
It's not foolish to make a distinction between languages that have
that sort of hierarchy and that have a base class from which all
classes inherit, and languages that don't. "Pure" is probably the
wrong word to use for that distinction; can anyone suggest a better?
--
Matt Austern matt@physics.berkeley.edu
http://dogbert.lbl.gov/~matt
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-21 0:00 ` Matt Austern
@ 1995-04-22 0:00 ` Robert Martin
1995-04-22 0:00 ` David Weller
1 sibling, 0 replies; 37+ messages in thread
From: Robert Martin @ 1995-04-22 0:00 UTC (permalink / raw)
matt@physics2.berkeley.edu (Matt Austern) writes:
>I agree that "pure" is a loaded word and that we should stop using it.
>However, I do see the benefits of having a language where classes and
>basic built-in types and operating system resources are objects;
>languages like that make it much easier to treat things consistently.
Do you agree that a language in which *everything* is an object is
intrinsically more limited than a language in which the programmer
gets to decide what to put in an object and what to keep out? Do you
also agree that programs designed for the first type of language can
be implemented in the second type, more easily that vice versa? If
so, do you agree that the benefits of the first type automatically
transfer to the second type?
>A well-designed class hierarchy that includes the basic types and
>that's rooted in some class like Object or ANY can sometimes be quite
>useful.
Sometimes, although I generally prefer not to have a single root to
the inheritance tree.
>It's not foolish to make a distinction between languages that have
>that sort of hierarchy and that have a base class from which all
>classes inherit, and languages that don't.
Agreed.
"Pure" is probably the
>wrong word to use for that distinction; can anyone suggest a better?
Sure. Tree model languages have all objects rooted at some top level
object. Forest model language can have many independent disconnected
inheritance hierarchies.
This is a nomenclature that has been used to describe class libraries.
I think it covers languages quite nicely too.
--
Robert Martin | Design Consulting | Training courses offered:
Object Mentor Assoc.| rmartin@rcmcon.com | Object Oriented Analysis
2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 | C++
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: C++ not OOP? (Was: Language Efficiency
1995-04-21 0:00 ` Matt Austern
1995-04-22 0:00 ` Robert Martin
@ 1995-04-22 0:00 ` David Weller
1 sibling, 0 replies; 37+ messages in thread
From: David Weller @ 1995-04-22 0:00 UTC (permalink / raw)
In article <MATT.95Apr21124916@physics2.berkeley.edu>,
Matt Austern <matt@physics.berkeley.edu> wrote:
>It's not foolish to make a distinction between languages that have
>that sort of hierarchy and that have a base class from which all
>classes inherit, and languages that don't. "Pure" is probably the
>wrong word to use for that distinction; can anyone suggest a better?
>--
How about something that gives a relative sense of how much the
language is centered around accessing both data and operations around
encapsulated declarations of objects... object-oriented, in other
words. :-)
One nice thing about adopting the concept of "scale" of
"object-oriented" is that we can be dispassionate about it, since
there are many, many other scales to consider when using or selecting
a language (flexibility comes to mind as one example...there is very
little correlation between the flexibility of a language and it's
OO-ness).
--
Frustrated with C, C++, Pascal, Fortran? Ada95 _might_ be for you!
For all sorts of interesting Ada95 tidbits, run the command:
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
if u cn rd ths, u r gd enuf to chg to Ada :-)
^ permalink raw reply [flat|nested] 37+ messages in thread