comp.lang.ada
 help / color / mirror / Atom feed
From: jls@netcom.COM (Jim Showalter)
Subject: Re: Ada vs C++, Franz Lisp to the rescue?
Date: 1 Jun 91 03:16:50 GMT	[thread overview]
Message-ID: <1991Jun1.031650.27547@netcom.COM> (raw)
In-Reply-To: 0D010010.i1lndi@brain.UUCP

chuck@brain.UUCP (Chuck Shotton) first wrote:
>> >I won't argue the point that Ada is far superior when it comes to large system
>> >development. This is a fact, plain and simple, and C++ cannot hold a candle
>> >to Ada's abilities to decompose a problem into managable pieces and insure
>> >the consistency between them. However, Ada is not all things to all programming
>> >tasks, and one of the things it isn't is an object oriented programming
>> >language.

I [jls@netcom.com (Jim Showalter)] then responded that the obvious conclusion
to be drawn from the above paragraph was that OO is apparently basically
irrelevant to developing large systems.

chuck@brain.UUCP (Chuck Shotten) then responded:

>First, the only point being made in 1 and 2 above is that Ada is well suited
>to supporting the decomposition of systems into manageable pieces, and it
>doesn't provide the same level of SYNTACTIC support for OOP as other professed
>OOP languages.

Chuck, let me try again. When I read the first paragraph above, what I hear
is "Ada is far superior to C++ for large system development" AND "Ada is
not an object oriented programming language". Correct me if I'm wrong,
but don't these two statements in conjunction essentially say "Ada,
which is not an object oriented programming language, is nevertheless
far superior to C++ for large system development"? If so, why do you
deem it unreasonable for me to go one step further and conclude "The
usefulness of the 'pure' OO paradigm for actually building large systems
may well be overstated" (a conclusion I came to years ago)? I'm reading
the same text you're writing--please help me to understand why we are
in such disagreement.

>I'd like YOU to explain to netland how to support dynamic inheritance at 
>runtime in Ada without resorting to manually-supported coding conventions.

I never claimed that Ada was a so-called "pure" object-oriented language;
not surprisingly, what you describe above is hard to do in Ada. What I
HAVE claimed, repeatedly, is that this is in all likelyhood not much
of a deficit, particularly since what CAN be done and HAS been done in
Ada is stuff like building, on time and on budget, mega-SLOC distributed
real-time systems that meet all of their performance requirements (can
you make similar claims for any of the predominant "pure" OO 
languages?--this is not a flame: I'm honestly asking if anybody can
supply similar success stories for significant projects written in
C++, Smalltalk, Eiffel, etc [I asked a similar question a week or
so ago, and have so far received no responses]).

I have long believed that the most significant payoff from
using an OO language was in its general support for ABSTRACTION (e.g. narrow
interfaces, hidden data, etc), not in its specific support for inheritance and
polymorphism. Focusing on interfaces and design, suppressing inessential
details, and enforcing it all through the compiler is the big win that
gets you 90% (or more) of the way toward a well-engineered system. Support
for inheritance is just icing on the cake. Don't believe me? Consider, then,
a new language, C++--. This language retains the support for inheritance
and polymorphism offered by the current C++ language, but it is defined in
such a way that the .h files cease to exist, as do the notions of private
and protected data. Now, you tell me--what would be the relative usefulness
of this hypothetical language in comparison to, say, Ada, which HAS private
data and a spec notion analogous to C++'s .h files? I think
the answer is obvious--as soon as the support for abstraction capture and
enforcement is removed, the remaining benefits of the language are minimal,
even though what remains supports inheritance, dynamic binding, and all
that jazz.

I'm not saying that inheritance is useLESS, just that we should strive to
assign accurate relative weights to the various language features, and
first concentrate on getting the MOST useful features across to the widest
possible audience. To run off trying to spread the gospel about the wonders
of multiple inheritance in an industry where I have actually heard a well-
paid developer at a Large American Corporation ask (in all honesty): "What
is an interface?" seems to me to be a misguided expenditure of energy and
time.

>The whole point of the comparison between C++ and Ada hinges on the semantic
>interpretation of the term "object-oriented." To most Ada-literate individuals,
>"object-oriented" refers to the concepts of information hiding and specific
>design methodologies. To others (C++, academia, etc.) "object-oriented" connotes
>message passing, inheritance, dynamic binding, methods, classes, etc. Ada
>does NOT provide direct support via language constructs and run-time behavior
>to support all of these concepts. The burden is placed on the programmer to
>implement "message passing" and there is no way to safely (consistenly) implement
>dynamic binding.

And the burden is placed on the OO academic to demonstrate that any of this
is of any use in building real systems. It is probably a good idea to keep
in mind that the entire industry is NOT yet convinced that the OO paradigm
is the One True Way, that there are horror stories of projects going terribly
awry by embracing too uncritically the whole OO sales pitch (things, for
example, sometimes run too slowly to meet the original requirements...),
that there is some evidence of a growing backlash against OO because it
has turned out in at least some cases to have been oversold (as is the
way with most One True Ways), and so forth. Just because a cause generates
a lot of press and a lot of true believers doesn't make it RIGHT. It has
been my observation that OO fervor needs to be tempered with pragmatism
based on real-world experience, or it leads to disappointment.

>Rather than degenerate into a "mine's bigger than yours" comparison of two
>vastly different languages (and programming paradigms), it would be more 
>constructive to discuss how to implement TRUE object-oriented features within
>the current limitations of Ada. I'd be interested in hearing suggestions for
>supporting the aforementioned list of "alleged" object oriented language features
>using plain vanilla Ada. This could actually be useful on some real projects.

I believe there are several pre-processors available for Ada that add these
very features to the language at relatively low cost. I've never felt the
need for such features, so I've never looked into what these pre-processors
actually do, but I've heard that they're pretty useful.
-- 
**************** JIM SHOWALTER, jls@netcom.com, (408) 243-0630 ****************
*Proven solutions to software problems. Consulting and training on all aspects*
*of software development. Management/process/methodology. Architecture/design/*
*reuse. Quality/productivity. Risk reduction. EFFECTIVE OO usage. Ada/C++.    *

  reply	other threads:[~1991-06-01  3:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-05-30 18:25 Ada vs C++, Franz Lisp to the rescue? Chuck Shotton
1991-06-01  3:16 ` Jim Showalter [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-05-25 15:09 Chuck Shotton
1991-05-30  0:41 ` Jim Showalter
1991-05-21 13:18 SAHARBAUGH
1991-05-23  2:05 ` Jim Showalter
1991-05-30  2:23 ` Ted Holden
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox