comp.lang.ada
 help / color / mirror / Atom feed
From: Lao Xiao Hai <laoxhai@ix.netcom.com>
Subject: Re: Another important feature of Ada
Date: 2000/11/19
Date: 2000-11-19T22:14:19+00:00	[thread overview]
Message-ID: <3A184F9B.76DB27C3@ix.netcom.com> (raw)
In-Reply-To: 3A12041B.BCFD8CA0@worldnet.att.net



James Rogers wrote:

> I have been following a thread between comp.lang.eiffel and
> comp.lang.c++.moderated. The thread is boiling down to a discussion of
> the virtues and vices of separating interface from implementation.
>
> The points being made against sepration of interface and implementation
> focus on a concept that duplication of code is BAD, and separation
> of interface and implementation requires some duplication of code.

First, I like much of the Eiffel language design and would like to see
Ada adopt a few of its features.   Second,  I prefer the Ada model of
physically separating the interface from the implementation.   In
reliability
theory, there is a notion of parallel redundancy that is often introduced
to improve the chances of a correct result.   I see Ada compilation model
as somewhat analogous to the parallel redundancy practice.

On large-scale software development projects, where more than one person
is engaged in  developing the code, this redundancy serves as an additional

level of checking between specification and implementation.

While this same effect can be achieved, to some extent in Eiffel, and to a
much lessor extent in C++, Ada is unique in its enforcement.   Ada does not
even
allow implementation code in the specification.  The other languages
mentioned
do permit it.   C++ even requires implementation code in the class
definition
under some silly circumstances

We are dealing here with programmers, most of whom are endowed with a
certain
measure of humanity.   With human programmers, if something can be done it
will be.   This includes succumbing to the temptation to start implementing
algorithmic
code too early in the process.  I am as guilty as anyone else of thinking
about how
I plan to solve a problem before fully considering what problem I am trying
to solve.

Separating the specification from the implementation presents a simple but
effective
obstacle to premature implementation.   Ada, as readers of this forum
understand,
even allows us to defer implementations to small separately compiled
subunits which,
in-turn, provide excellent opportunities for controlling dependencies, as
well as focusing
longer on the "what" before getting involved in the "how.".

Eiffel programmers will retort that they can do the same thing.    I agree,
they can.  However,
being able to do something and doing it are two different things.  Ada
requires the separation.
The argument about duplication of code is not very convincing. Are we
looking for ways
to make coding easier or are we looking for a language design that enforces
a higher level of
discipline in the software engineering process?

Richard Riehle






  parent reply	other threads:[~2000-11-19  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-15  3:32 Another important feature of Ada James Rogers
2000-11-15  0:00 ` mjsilva
2000-11-15  0:00   ` Brian Rogoff
2000-11-17  0:00     ` Scott Ingram
2000-11-15  0:00 ` Mark T
2000-11-15  0:00   ` Tucker Taft
2000-11-15  0:00     ` Laurent Guerby
2000-11-15  0:00     ` Ed Falis
2000-11-17  0:00       ` Jean-Pierre Rosen
2000-11-18  0:00         ` Ed Falis
2000-11-18  0:00           ` pete
2000-11-19  0:00             ` Jean-Pierre Rosen
2000-11-19  0:00             ` James Rogers
2000-11-19  0:00               ` Ray Blaak
2000-11-20  2:39                 ` Robert Dewar
2000-11-20  7:43                   ` Ehud Lamm
2000-11-21  0:00                   ` Ray Blaak
2000-11-21  0:00                     ` Robert Dewar
2000-11-20  7:47                 ` Ehud Lamm
2000-11-19  0:00               ` David Starner
2000-11-18  0:00           ` Karel Thoenissen
2000-11-19  0:00 ` Lao Xiao Hai [this message]
2000-11-20  0:00 ` Michel Gauthier
replies disabled

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