TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
"Alexandre E. Kopilovitch" <[log in to unmask]>
Date:
Fri, 6 Dec 2002 10:52:53 -0500
Reply-To:
Stephen Leake <[log in to unmask]>
Subject:
From:
Stephen Leake <[log in to unmask]>
In-Reply-To:
Content-Type:
text/plain; charset=us-ascii
MIME-Version:
1.0
Parts/Attachments:
text/plain (91 lines)
"Alexandre E. Kopilovitch" <[log in to unmask]> writes:

> Well, I'll try. The difficulty is that I can't, in principle,
> present a concrete example.

That will be a problem.

> If a problem has good description then of course, Ada is better,
> safer etc. language for it then C++.

Ok, we agree on that.

> And if you believe that programming always follows satisfactory
> description of the problem then you surely will not see my point.

I'll try.

> But in my experience, in many real cases programmers aren't provided
> with such a description, and are forced to explore the domain area
> themselves, and at the same time they must demonstrate their
> progress in coding.

True, that is often the way I work.

> In that situation, C++ is better both pragmatically and
> theoretically. The pragmatic benefits are, I think, quite obvious;

Not to me. I am far more productive in Ada than in C++, whether I am
starting from a solid design or not.

The reason is that when I am forced to change the design, Ada finds
all the inconsistencies for me; C++ just muddles thru, hiding the
problems.

> but the theoretical difference needs an explanation, I agree. In my
> opinion, the difference is in that C++'s basic paradigm is
> class/object, which is an adequate notion for direct simulation.

Ada can do class/object; it can also do other paradigms. If you like
class/object for a particular project, go ahead and do that.

Ada gives you more choice; C++ restricts your choices.

> <skip discussion of why classes are good>

> But with Ada the picture is rather different. The strength of Ada
> typing system is useless because we know too little about the types
> we need in near future.

Well, I don't find it "useless". I make my best guess at the proper
type structure. When I have to change it, I do so.

On the other hand, Ada can be used in a way that is just as weakly
typed as C++; always use Integer, etc.

> And what is Ada package - which real thing it corresponds?

A package with a type and operations is a class.

A package with hidden state is an object.

etc, etc, etc. Yes, you have to pick a paradigm to use; sometimes that
is hard.

> So, if we don't know enough about the problem then all Ada's major
> tools become useless.

Even if they are "useless", they are not "negative".

> Ada facilitates stratification of the "problem space"; that is
> strategic advantage when we have enough (perhaps, informal)
> knowledge about the problem, but if not - then we are forced to
> model/simulate the reality directly, and Ada do not facilitate that
> as conveniently as C++.

Hmm. You have not said why Ada is _worse_ than C++. Well, you did say
"Ada doesn't do class/object", but that is not true. You have said
that in most situations Ada is _better_ than C++, but sometimes you
can't really take advantage of the best features. Ok, I'll agree with
that. Still not a reason to use C++.

> I think that most people (concerned with the choice) intuitively
> feel that Ada isn't a proper tool for programming in high
> uncertainity within a problem statement, and do not even try - so
> there should not be failures caused by Ada.

That could be true; interesting notion.

--
-- Stephe

ATOM RSS1 RSS2