comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Another important feature of Ada
Date: 2000/11/15
Date: 2000-11-15T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0011150846100.13723-100000@shell5.ba.best.com> (raw)
In-Reply-To: 8uud86$c22$1@nnrp1.deja.com

On Wed, 15 Nov 2000 mjsilva@my-deja.com wrote:
> In article <3A12041B.BCFD8CA0@worldnet.att.net>,
>   James Rogers <jimmaureenrogers@worldnet.att.net> 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.
> 
> I wonder how it could be otherwise?

In Ocaml, the interface file contains ony the type signature of functions
in the implementation file, and there is no need to repeat the type
information again in the implementation file. So admittedly there is some 
duplication (the name of a function) but much less than in Ada. There is 
actually no need to right a .mli file (equivalent to a .ads in GNAT) for 
each .ml (= .adb) unless you want to restrict what is visible or provide 
the ability for others to compile without the full implementation. 

However, this duplication has never been a significant issue for me in
Ada, or even C (my C code is very Ada-like) so I often wonder why people 
whine about this so much. I did a bit of programming in Sather and Eiffel
a while ago and I have to admit that while there are lots of nice features
in those languages I prefer Ada, and this separation, redundancy and all, 
plays a large part in that preference. 

-- Brian






  reply	other threads:[~2000-11-15  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 ` 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               ` David Starner
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-18  0:00           ` Karel Thoenissen
2000-11-15  0:00 ` mjsilva
2000-11-15  0:00   ` Brian Rogoff [this message]
2000-11-17  0:00     ` Scott Ingram
2000-11-19  0:00 ` Lao Xiao Hai
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