comp.lang.ada
 help / color / mirror / Atom feed
* Re: c++ vs ada results
@ 1991-08-14 14:41 Fred Stluka
  0 siblings, 0 replies; 57+ messages in thread
From: Fred Stluka @ 1991-08-14 14:41 UTC (permalink / raw)


In article <1991Aug13.142900.28910@slcs.slb.com> cornish@slcs.slb.com (Darryl C
ornish) writes:
> Grady Booch converted the Booch Ada Component Library from ADA to C++.
> The result was thaty 150,000 lines of ADA became 20,000 lines of C++. 
> 
> While smaller is not necessarily better, this does give one cause to
> wonder at the logic of people (e.g., the DOD) who make decisions on 
> the fact that ADA programmers produced 30% more lines of code / month 
> than C++ programmers.

This comparison requires some context.

The Booch parts are a small collection of FAMILIES of related parts.
That is, there are dozens of variations on the implementation of a 
stack, dozens of queues, etc.  This is exactly the kind of code which
can benefit MOST by inheritance (one of C++'s admitted strengths over 
Ada).  It would be hard to contrive a 150,000 line example which was 
less suited to Ada and more suited to C++.  

Based on the huge amount of duplication in the Booch parts, I am 
surprised that the reduction was only a factor of 7.5.

It is unreasonable to extrapolate from this single figure when 
discussing complete software systems.

--Fred
-- 
Fred Stluka                               Internet: stluka@software.org
Software Productivity Consortium          UUNet:    ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070 USA   Voice:    (703)742-7236

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-30  7:24 Ma ts Henricson
  0 siblings, 0 replies; 57+ messages in thread
From: Ma ts Henricson @ 1991-08-30  7:24 UTC (permalink / raw)


emery@Dr_No.mitre.org (David Emery) writes:

>Where I work, 100k SLOC is a small program, 1-2m SLOC is average, and
>a really big program might have 5-10m SLOC.  Ada is making a
>difference in programs of this size (e.g. AFATDS, CCPDS-R,
>STANFINS-R).  I've not heard of similar-sized C++ programs.

Of what I know, Mentor Graphics holds the record in the C++ industry.
But, then again, I may be wrong... ;-) Unfortunately, I don't know
exactly how large their system is.

Mats Henricson

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-29 16:54 David Emery
  0 siblings, 0 replies; 57+ messages in thread
From: David Emery @ 1991-08-29 16:54 UTC (permalink / raw)


The Booch Components ARE NOT a complete system.  There has been some
debate over whether the C++ components achieve the same level of
functionality as the Ada components, i.e.  is there a C++ component
for every Ada component.  

I would be very surprised if the Booch Components did not shrink in
SLOC when coded in C++.  They were designed using that kind of
object-oriented paradigm.  But, real systems consist of a lot more
than little data structure components.  

Where I work, 100k SLOC is a small program, 1-2m SLOC is average, and
a really big program might have 5-10m SLOC.  Ada is making a
difference in programs of this size (e.g. AFATDS, CCPDS-R,
STANFINS-R).  I've not heard of similar-sized C++ programs.  What I
have heard is that large C++ programs, particularly those developed by
different groups of people, and integrated, tend to fall apart when
something goes wrong in the inheritance heirarchy.  In particular,
trying to find out "whose method is this?" in a very large, complex
C++ program is damned hard.

By the way, if Darryl Cornish thinks that software is "finally
discovering the architect/engineer/trades-person paradigm" just now,
then he has missed much of the discussions in software engineering
over the last 50 years, both theoretical work (e.g. Chief Programmer
Teams) and practical experience.  Read "The Mythical Man-Month", and
then come back and say that architect/engineer/trades-person is a new
idea for software...

				dave

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-16 17:56 Doug Smith
  0 siblings, 0 replies; 57+ messages in thread
From: Doug Smith @ 1991-08-16 17:56 UTC (permalink / raw)


In article <1991Aug15.154021.24043@cats.com> andy@cats.com (Andy Davidson) writ
es:
> In article <1991Aug14.182554.16576@software.org> smithd@software.org (Doug Sm
ith) writes:
> >
> >It is possible to take an algorithmic approach to building these
> >utilities.  This creates a smaller library of generics that provide the

> What exactly do you mean by an "algorithmic approach"? Do you mean a
> structured design approch?? Can you elaborate on your statement
> 
(I don't think this is structured design, you be the judge...)

Since several people have asked for more information...

There is a published work that you can reference:

    The Ada Generic Library
        Linear List Processing Packages
    Musser & Stepanov
    Springer-Verlag 1989

An example that comes to mind is the usual sort generic:

    generic
        type Element is private;
        type Index is (<>);
        type Arrays is array (Index range <>) of Element;
        with function "<" (Left, Right : Element)
                           return        Boolean;
    procedure Sort (Arr : in out Arrays);

I consider this the usual data structure oriented approach.  Which is
a conventient form, but should be built on top of a more general
sorting algorithm:

    generic
        type Element is limited private;
        type Index is (<>);
        type Arrays is array (Index range <>) of Element;
        with function "<" (Left, Right : Element)
                           return        Boolean;
        with procedure Swap (Left, Right : in out Element);
    procedure Sort (Arr : in out Arrays);

Which could be built on another, even more general sorting algorithm:

    generic
        type Index   is (<>);
        with function Element_Is_Less_Than
                          (Left, Right : Index)
                           return        Boolean;
        with procedure Swap (Left, Right : in     Index);
    procedure Sort (From, To : in     Index);

And then I would even try to make Index limited private, but that
gets messy, and you get the idea.  When you get down to the actual
algorithm, you will have declared the assumptions that the algorithm
makes as part of the declaration.

So if you can describe the Quick_Sort algorithm using only limited
private types, and for a binary tree you have a way of partitioning
the tree, moving elements, comparing elements, etc.--then you have
an efficient sort that works both on arrays and binary trees.

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-15 15:40 Andy Davidson
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Davidson @ 1991-08-15 15:40 UTC (permalink / raw)


In article <1991Aug14.182554.16576@software.org> smithd@software.org (Doug Smit
h) writes:
>
>There are several ways that the Booch Components use generics that
>create an excessive amount of code.  As an early attempt to use generics
>for a library of reusable code, they have stood up very well.  But
>as an example of what can be accomplished with generics, they are
>slightly dated.
>
>As relates to this thread, there is excessive duplication of code to
>handle the same algorithms.  For example, several of the generics that
>use linked list implement traversing, constructing, etc. similarly.
>
>It is possible to take an algorithmic approach to building these
>utilities.  This creates a smaller library of generics that provide the
>same capabilities.  If my memory serves, a conservative estimate was a
>reduction from 1000+ to about 150 generic packages.  I would also
>predict an increase in the number of utilities that could be constructed
>from the 150 generics.
>
>Although I did not attempt to convert the Booch library to an
>algorithmic approach, I did build a memory management library which
>consisted of 8 packages (2 + 3 + 3) that could construct 18 (2 * 3 * 3)
>utilities.  They were used on a project and worked fine.

What exactly do you mean by an "algorithmic approach"? Do you mean a
structured design approch?? Can you elaborate on your statement

	"It is possible to take an algorithmic approach to building these
	utilities.  This creates a smaller library of generics that provide the
	same capabilities."

Thanks in Advance Andy
-- 

-----------------------------------------------------------------
                 "bede-bede-bede Thats all Folks"
                            Porky Pig

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-15 13:30 Paul Baker - CTA
  0 siblings, 0 replies; 57+ messages in thread
From: Paul Baker - CTA @ 1991-08-15 13:30 UTC (permalink / raw)


Since Booch hasn't joined this thread, let me pass along some
rumors/disinformation about the two sets of Booch components.

The dramatic reduction in code size between the Ada and C++ versions
requires using both inheritance and a home-brew template mechanism.
The C++ results, while they appear dramatic, do not represent portable
C++ code.  They uses Booch's intrepretations of the next revision of
C++.  The Ada components are portable.  A fair comparison would be
to contrast the next version of C++ with Ada9X.  The current version
of C++ wouldn't handle this problem at all well.

I do believe, however, that the reduction in size is a true measure of
the value of inheritance as a code reuse mechanism.  The question is,
is inheritance the best mechanism?  Generative reuse may be more
effective and its code easier to maintain.

plb

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-14 20:15 Jim Showalter
  0 siblings, 0 replies; 57+ messages in thread
From: Jim Showalter @ 1991-08-14 20:15 UTC (permalink / raw)


smithd@software.org (Doug Smith) writes:

>As an early attempt to use generics
>for a library of reusable code, they have stood up very well.  But
>as an example of what can be accomplished with generics, they are
>slightly dated.

The C++ version benefitted from several years of 20-20 hindsight.
What would be interesting to me would be for the Ada version to
be rewritten using everything that has been learned about Ada
and C++ in those years, and _then_ comparing them.

I concede, however, that the result is still unlikely to be as
dense as the C++ version, precisely because of the lack of inheritance.
Consider, for example, what happens when you try to implement a
singly-linked list generic and a doubly-linked list generic: since
the data structures are fundamentally different, you wind up having
to write two different packages even though they are quite similar in
a variety of ways.

On the other hand, this still isn't a truly fair comparison. The
C++ version exploits both inheritance and genericity ("templates")
to achieve its density. The Ada version has only genericity at its
disposal, and so naturally comes up short (well, long--but you know
what I mean). But consider this: many of the people who extoll the
virtues of inheritance do so without taking genericity into account.
My guess is that the C++ version written with inheritance but not
templates would be about as cumbersome as the Ada version written
with genericity but not inheritance. And I also think that both
versions would be about the same size (within a small constant
attributable to syntactical differences and naming conventions) if
they were both written using inheritance and genericity. In sum,
I think both of these features are important to a language.
-- 
* Jim Showalter, software engineering consultant *
*         e-mail: jls@netcom.com                 *
*         voice : (408) 243-0630                 *
*         data  : (408) 984-5019                 *

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-14 19:15 Doug Smith
  0 siblings, 0 replies; 57+ messages in thread
From: Doug Smith @ 1991-08-14 19:15 UTC (permalink / raw)


In article <1991Aug14.182554.16576@software.org> smithd@software.org (Doug Smit
h) writes:
> In article <1991Aug14.050358.19787@beaver.cs.washington.edu> mfeldman@june.cs
.washington.edu (Mike Feldman) writes:
> > In article <1991Aug13.142900.28910@slcs.slb.com> cornish@slcs.slb.com (Darr
yl Cornish) writes:
> > >
> 
> It is possible to take an algorithmic approach to building these
> utilities.  This creates a smaller library of generics that provide the
> same capabilities.  If my memory serves, a conservative estimate was a
> reduction from 1000+ to about 150 generic packages.  I would also
> predict an increase in the number of utilities that could be constructed
> from the 150 generics.

Well, I finally found an old copy of the paper, and my age has warped
my memory.  The number of Booch components is 501 (not 1000+), and the
prediction was that only a "few dozen" generics would be needed if the
algorithmic approach was used.

Additionally, the memory management utilites consisted of 7 (3 + 2 + 2)
generic packages that implemented 12 (3 * 2 *2) utilities.  It should
still be obvious how powerful the approach is as the number of generics
increases.

Please send your flames directly to me.  I deserve them for not checking
the facts first.

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-14 18:40 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!utgpu!
  0 siblings, 0 replies; 57+ messages in thread
From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!utgpu! @ 1991-08-14 18:40 UTC (permalink / raw)


In article <1991Aug14.144129.6334@software.org>, stluka@software.org (Fred Stlu
ka) writes:
|> In article <1991Aug13.142900.28910@slcs.slb.com> cornish@slcs.slb.com (Darry
l Cornish) writes:
|> > Grady Booch converted the Booch Ada Component Library from ADA to C++.
|> > The result was thaty 150,000 lines of ADA became 20,000 lines of C++. 
|> > 
|> > While smaller is not necessarily better, this does give one cause to
|> > wonder at the logic of people (e.g., the DOD) who make decisions on 
|> > the fact that ADA programmers produced 30% more lines of code / month 
|> > than C++ programmers.
|> 
|> This comparison requires some context.
|> 
|> The Booch parts are a small collection of FAMILIES of related parts.
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes, but that's what you get in a typical application
(in my own experience 4 years of C++) coded using OO principles.

|> ...

-- 
Steve Juneau                            Recherches Bell-Northern Ltee
                                        3, Place du Commerce
phone: (514) 765-8246                   Verdun, Quebec, Canada
fax:   (514) 876-3681                   H3E 1H6

email: bnrmtl!stevej@larry.mcrcim.mcgill.edu

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-14 18:25 Doug Smith
  0 siblings, 0 replies; 57+ messages in thread
From: Doug Smith @ 1991-08-14 18:25 UTC (permalink / raw)


In article <1991Aug14.050358.19787@beaver.cs.washington.edu> mfeldman@june.cs.w
ashington.edu (Mike Feldman) writes:
> In article <1991Aug13.142900.28910@slcs.slb.com> cornish@slcs.slb.com (Darryl
 Cornish) writes:
> >
> >Grady Booch converted the Booch Ada Component Library from ADA to C++.
> >The result was thaty 150,000 lines of ADA became 20,000 lines of C++. 
> >
> 
> Also I wonder if coding style made any difference. Perhaps Booch adopted a
> more concise style in the C++ version. I have not seen the C++ version.
> Booch's Ada components are, IMHO, rather excessively verbose, especially
> as to extra-long names, which of course make the total LOC higher.
> 
> I don't want to get into language wars here, just to be certain we are
> comparing the versions on a level playing field. Assuming that there were 
> inherent aspects of C++ that allowed more concise coding - and not just a
> different lexical convention, for example - then it would be interesting
> to know what these aspects were. Maybe Grady will respond himself?
> 
> Mike

There are several ways that the Booch Components use generics that
create an excessive amount of code.  As an early attempt to use generics
for a library of reusable code, they have stood up very well.  But
as an example of what can be accomplished with generics, they are
slightly dated.

As relates to this thread, there is excessive duplication of code to
handle the same algorithms.  For example, several of the generics that
use linked list implement traversing, constructing, etc. similarly.

It is possible to take an algorithmic approach to building these
utilities.  This creates a smaller library of generics that provide the
same capabilities.  If my memory serves, a conservative estimate was a
reduction from 1000+ to about 150 generic packages.  I would also
predict an increase in the number of utilities that could be constructed
from the 150 generics.

Although I did not attempt to convert the Booch library to an
algorithmic approach, I did build a memory management library which
consisted of 8 packages (2 + 3 + 3) that could construct 18 (2 * 3 * 3)
utilities.  They were used on a project and worked fine.

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-14  5:03 Mike Feldman
  0 siblings, 0 replies; 57+ messages in thread
From: Mike Feldman @ 1991-08-14  5:03 UTC (permalink / raw)


In article <1991Aug13.142900.28910@slcs.slb.com> cornish@slcs.slb.com (Darryl C
ornish) writes:
>
>Grady Booch converted the Booch Ada Component Library from ADA to C++.
>The result was thaty 150,000 lines of ADA became 20,000 lines of C++. 
>
First a bit of pedantry: please spell it Ada, not ADA.

Second, the Ada version of the Booch components has both sequential and
concurrent versions of each component; the concurrent version serializes
all method calls. This probably accounts for a fair number of the "extra"
lines. Does the C++ version take account - somehow - of a concurrent
environment?

Also I wonder if coding style made any difference. Perhaps Booch adopted a
more concise style in the C++ version. I have not seen the C++ version.
Booch's Ada components are, IMHO, rather excessively verbose, especially
as to extra-long names, which of course make the total LOC higher.

I don't want to get into language wars here, just to be certain we are
comparing the versions on a level playing field. Assuming that there were 
inherent aspects of C++ that allowed more concise coding - and not just a
different lexical convention, for example - then it would be interesting
to know what these aspects were. Maybe Grady will respond himself?

Mike


Mike

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-13 22:08 David Emery
  0 siblings, 0 replies; 57+ messages in thread
From: David Emery @ 1991-08-13 22:08 UTC (permalink / raw)


>Grady Booch converted the Booch Ada Component Library from ADA to C++.
>The result was thaty 150,000 lines of ADA became 20,000 lines of C++. 
Since C++ has no expression of concurrency, I strongly suspect that a
lot of the "code reduction" comes from not having to duplicate all of
the tasking variants of the Booch Components.  

Also, the Booch Components are NOT a complete system.  They're the
type of things (common data structures, etc) where C++ _should_ be
powerful.  That's the easy stuff in an application.  Unfortunately,
real systems tend to have a lot of algorithmic and concurrency stuff
that gets in the way of these kinds of designs, not to mention
large-scale structural and architectural issues.

I think it would be very interesting to compare "systems" and not just
"components".  There's some of that (although you may find the data
suspect because of the source) in the Ada vs C++ study that has
recently come out.

				dave emery
				emery@dr_no.mitre.org

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-08-13 14:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.e
  0 siblings, 0 replies; 57+ messages in thread
From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.e @ 1991-08-13 14:29 UTC (permalink / raw)


In article <EACHUS.91Jun20145614@largo.mitre.org>, eachus@largo.mitre.org (Robe
rt I. Eachus) writes:
|> 
|> In article <1991Jun20.140836.24430@scrumpy@.bnr.ca> stevej@bnrmtl.bnr.ca (St
eve Juneau) writes:
|> 
|>    Was all this achievable because you used Ada, or can have be done with
|>    any language?  IMHO it can be done with any language.
|> 
|>      Theoretically it can be done in any language, and I even know of
|> cases where it was done that way in COBOL and C.  But from a
|> political/mangagement point of view, when using Ada it doesn't require
|> a group of highly qualified and cowhenatmmitted people to make it work.
|> There are other languages where it can be made to work easily, such as
|> Modula2, but c++ is not one of them.
|> 
|> 
|> --
|> 
|> 					Robert I. Eachus
|> 
|> with STANDARD_DISCLAIMER;
|> use  STANDARD_DISCLAIMER;
|> function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...


Have you tried to architect a large propram with C++. 

Grady Booch converted the Booch Ada Component Library from ADA to C++.
The result was thaty 150,000 lines of ADA became 20,000 lines of C++. 

While smaller is not necessarily better, this does give one cause to
wonder at the logic of people (e.g., the DOD) who make decisions on the fact th
at ADA programmers produced 30% more lines of code / month than C++ programmers
.

There are things in C++ that I don't like but overall it is a useful
tool. It can definitely be used as a vehicle for the implementation of
large projects with a few architects, a few more engineers, and a large
number of programmers.

It is interesting that we are finally discovering the architect/engineer/
trades-person paradigm for large project management. This paradigm has
been used successfully for around 4000 years in the construction industry,
although 4000 years ago the trades people were called slaves....I guess
things really don't change.

djc
//---------------------------------------------------------------------
E-Mail address:
internet	cornish@slcs.slb.com
Sinet		slcs::cornish

Mail address:
Schlumberger Laboratory for Computer Science
8311 North RR 620
PO Box 200015
Austin, TX, 78720-0015
Att'n: Darryl Cornish

Phone: (512) 331-3787

//---------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-07-01  5:15 Andrew Dunstan
  0 siblings, 0 replies; 57+ messages in thread
From: Andrew Dunstan @ 1991-07-01  5:15 UTC (permalink / raw)


In article <1991Jun26.224737.16660@netcom.COM>, jls@netcom.COM (Jim
Showalter) writes:
|> >I have read this and used a few of the tools. It has a useful set of
|> >tools, but there is just something about it that occasionally annoys me.
|> >Maybe it's just that I don't like identifiers like
|> >the_small_brown_dog_with_a_broken_left_front_leg! :-)
|> 
|> These names arose because Booch needed/wanted a way to unambiguously
|> specify the chief attributes of each abstraction (because of the semi-
|> combinatorial nature of the ways in which these attributes can be
|> mingled, there are cases where you have over a hundred flavors of a
|> particular fundamental kind of component, such as a queue). This is,
|> he'd be the first to admit, one of the places where inheritance would
|> be a natural match, since one could use it to specialize--his C++
|> version of these same components exploits inheritance.
|> 

I did have a smiley, Jim! Long package names I grant you, but I do find
names like of_the_set a bit annoying. Just a matter of taste, I guess.

While we are on this subject, Booch says that he rarely uses USE clauses,
because they "pollute the name space". I routinely use USE, and find that 
it makes the code more readable. Using qualified names all the time is a
pain in the neck.

Neither of these considerations would make me refrain from using Booch's
components.

|> >Seriously, what I find disconcerting is that his abstractions have a
|> >strange feel to them. They don't reflect the way I think about objects,
|> >so using them is a bit too much of an effort. (This is an important
|> >issue in program/library design!)
|> 
|> I would be interested in an elaboration of this point, since I am hard
|> pressed to imagine what you find disconcerting or strange about the
|> components--they're just things like lists and queues and rings and
|> stacks. Pretty mundane, really.

Ok, what follows is subject to the following caveat:
   I think Booch's book and components are valuable resources. There is a
   lot we can learn from them about good ways of doing things.

It was a while since I looked at the book, and then I did not do any analysis
of it, but gathered impressions. So when I saw your posting I went and got
a copy of the book and looked at it over the weekend. Here are some thoughts.

The stuff on conceptually linear structures (lists, stacks, queues, rings, 
strings) I generally have no quarrel with. Maps, Sets and Trees, however, are 
more problematical. I generally think of sets in functional terms. 
Hence, my sets package has union, intersection, set-difference etc. as
functions returning sets. Similarly for maps, (which are really binary
relations). When I was working last year on binary relations, I looked
at Booch's maps packages and decisded that they did not do what I
needed. Here is a piece of code from a program that used the package that I
eventually wrote (It works out the Director Symbol sets for the productions
in a grammar):
  DirSet :=
  --    the follow set of the left hand side if there is no right hand side,
         Rules*Null_Rule*pred*G*FOLLOW
  -- or the first set of the leftmost symbol,
      or Rules*succ*LeftMost*G*FIRST
  -- or the follow set of the lhs if the right hand side is only one nullable
  -- symbol
      or Rules*succ*LeftMost*Nullable*RightMost*pred**2*G*FOLLOW
  -- or the first set of the symbol following the leftmost symbol if the 
  -- leftmost is nullable, etc
      or Rules*succ*LeftMost*(+(Nullable*Next))*G*FIRST
  -- or the follow set of the lhs if the right hand side is completely nullable
      or Rules*succ*LeftMost*(+(Nullable*Next))*Nullable*RightMost*(+Prev)*
         Leftmost*pred**2*G*FOLLOW;

All the objects here are binary relations. "*" means relation composition and
unary "+" means relation closure.

Booch's maps tools do not provide these operations. Worse (from my point of 
view), if he did provide them it would be via procedure calls rather than 
function calls. This involves a serious limit on the expressiveness given by
his components.

I know (at least I think I know) why he has done it this way. It is safer
to do it like this, and so the managed forms will have the same interface
as the unamanaged forms. (I was dealing with the equivalent of his
sequential_unbounded_unamanaged forms). But the safety and uniformity
come at a high price. The loss of expressive power is not small.

What happens here? You can quickly accumulate MASSIVE amounts of garbage.
Ok, then, let's get better (existant?) garbage collectors instead of
doing things in a less than intuitive way.

There is also a problem in the level of abstraction applied. I use trees
quite a bit, but usually as a representation of something else (a set
for example). In fact Booch's first example of a tree in his chapter on trees
is of something that is not conceptually a tree at all: it is a bag (strictly
an ordered bag). Now there is nothing wrong in using an ADT at one level as
the representation of an ADT at another level, but it is a pity that Booch did
not give an example of a tree as an ADT instead of using it to represent
something else.

Lastly, the SWAP operation in some of these components (e.g. trees) is a bit
odd. Yes, I have read your defence of them in later mail, but this seems to me
to miss the point a bit. An ADT interface should be independent of safety and
management considerations, as far as possible. 

I hope this is enough elaboration for you! 

p.s. like you, I am an Ada fan.

#######################################################################
#  Andrew Dunstan                   #   There's nothing good or bad   #
#  Department of Computer Science   #   but thinking makes it so.     #
#  University of Adelaide           #                                 #
#  South Australia                  #          - Shakespeare          #
#  net: andrewd@cs.adelaide.edu.au  #                                 #
#######################################################################

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-06-27 18:24 Ray Diederich, 301-294-8400
  0 siblings, 0 replies; 57+ messages in thread
From: Ray Diederich, 301-294-8400 @ 1991-06-27 18:24 UTC (permalink / raw)


In INFO-ADA Vol.91, #181, pyrdc!grebyn!cbw@uunet.uu.net (Chuck Williams)
writes:

>It shows that c++ is cheaper than Ada.  There are a few other factors
>that need to be examined.  First the results of the study are derrived
>from a small number of c++ project and most of them are in the
>telecommunications domain.  Second, the learning curve to go from c to
>c++ is much shorter and easier than that for COBOL, Fortran, etc. to
>Ada.

and in INFO-ADA, Vol. 91, #183, netcomsv!jls@decwrl.dec.com (Jim Showalter)
replies:

>A much more valid comparison, I think, would be the learning curve to
>go from C to C++ vs the learning curve to go from Pascal to Ada.

I disagree. Sure it's easy to go from Pascal to Ada, but is anyone really
doing any Pascal programming? If the future Ada programmers are the current
Pascal programmers, there won't be many Ada programmers in the future. On
the other hand, the future C++ programmers are _likely_ to be the current C
programmers, and there seems to be an awful lot of C programmers.

So the valid consideration is still between C->C++ and COBOL/FORTRAN->Ada,
and I think that Chuck's original point is that this comparison unfairly
favors C++. The results of the original report are skewed, because it only
shows short-term gains.

Ray Diederich
GTE Government Systems Corporation
Electronic Defense Sector
National Center Systems Organization
========================================
My employer would prefer that I had no opinions to express, especially any
that may have been expressed here.
========================================

^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: c++ vs ada results
@ 1991-06-27 12:34 Chuck Shotton
  0 siblings, 0 replies; 57+ messages in thread
From: Chuck Shotton @ 1991-06-27 12:34 UTC (permalink / raw)



In article <1991Jun26.221313.5872@odi.com>, dlw@odi.com (Dan Weinreb) writes:
> However, anecdotal data such as "We did some projects, and we did them
> in Ada, and they went very well" does not provide experimental
> evidence that those same projects would have gone significantly less
> well had they been done in some other language, with everything else
> being equal.
> 
> 
Likewise, yours is not an argument for doing the projects in a language other
than Ada.

> It's very difficult, in general, to produce real evidence that would
> help to significantly support or deny claims about how choice of
> language affects the course of a software project, mainly because it's
> so hard to assure that all else is equal, and because it would be so
> expensive.

I can give you plenty of "evidence" relating the difference between a C project
and Ada project, both of which addressed the same problem space, resulted
in similar solutions, and were staffed by similar numbers of experienced people. I can
tell you from first hand experience that in every measure, the Ada task outperformed
the C task. If you'd like more details, please reply in e-mail, as this topic
has veered far astray from comp.lang.ada.

-----------------------------------------------------------------------
Chuck Shotton                 Internet:  cshotton@girch1.med.uth.tmc.edu
BIAP Systems                  UUCP:      ...!buster!brain!chuck
"Your silly quote here."      AppleLink: D1683       MacNet: shotton

^ permalink raw reply	[flat|nested] 57+ messages in thread
[parent not found: <164741@<1991Jun12>]
* Re: c++ vs ada results
@ 1991-06-20 16:24 Chuck Shotton
  1991-06-22  3:24 ` Thomas M. Breuel
  0 siblings, 1 reply; 57+ messages in thread
From: Chuck Shotton @ 1991-06-20 16:24 UTC (permalink / raw)



In article <1991Jun20.140836.24430@scrumpy@.bnr.ca>, stevej@bnrmtl.bnr.ca (Steve Juneau) writes:
> Was all this achievable because you used Ada, or can have be done with
> any language?  IMHO it can be done with any language.
> 

Please spare us. Automata Theory 101 teaches us that a Finite State Automaton
can solve any deterministic computing problem. Let's just toss programming
languages altogether.

The point is that Ada provides facilities in the language that support modular
design, consistent implementation, and most of all support integration and
test activities. Freed from the logistics of engineering and implementing
a system, Ada developers can actually concentrate more on the task at hand
instead of the mechanics of integrating a system. And, you CAN'T do that with
just any language.

As an aside, the religous wars (discussions) here over "my language is bigger
than your language" really don't appear to come to any constructive end. Do
they ever die down, or is the news group actually just a place for Ada weenies
to beat their chests? 

-----------------------------------------------------------------------
Chuck Shotton                 Internet:  cshotton@girch1.med.uth.tmc.edu
                              UUCP:      ...!buster!brain!chuck
"Your silly quote here."      AppleLink: D1683       MacNet: shotton

^ permalink raw reply	[flat|nested] 57+ messages in thread
* c++ vs ada results
@ 1991-06-12 16:47 alan dare
  1991-06-12 19:15 ` Paul Martz
                   ` (2 more replies)
  0 siblings, 3 replies; 57+ messages in thread
From: alan dare @ 1991-06-12 16:47 UTC (permalink / raw)




Netlanders,

	A short time ago I put a request out for information on c++ vs
Ada. I was hoping for several responses from people on both sides of the 
fence that were working on graphics applications. As my primary application
is graphics. What did I receive? I received more requests to post the results
than I received mail from people using c++ or Ada. I received only two
messages from people using c++ in a graphics application and none from
anyone using Ada. There were several messages from general users of c++
and only a few from Ada users. A kind soul FAX'ed me a document "A comparison
of Experiences with the Maintenance of Object-Oriented Systems: Ada vs. C++".
I didn't try to post a summary of the article (it's to big). The comments
below were sent to me. I don't claim any responsibility for them. I don't
currently use c++ or Ada. The comments are provided as a request from many 
people. Please don't use this posting to start a language war. 


The first post went to the following news groups:
	comp.sys.sgi
	comp.graphics
	alt.graphics
	comp.lang.ada
	comp.lang.c++

The comments below were edited only to reduce size, not content.


**************************************************
*** Graphics *************************************
**************************************************


o	I use C++ for graphics work. We considered ADA.
	Both have great pluses and a lot of minuses.
	Mostly the minuses are finding existing graphics packages 
	which are compatible. They are rare with C++ and non-existent 
	with ADA to my knowledge.

o	Ada has lots of features totally irrelevant to graphics 
	which cost something in compile time even on a compiler that
	produces efficient code.  It has no particular features to
	reccommend it for graphics particularly over any of the common 
	block-structured languages.



**************************************************
*** PRO ADA Comments *****************************
**************************************************

o	The Ada MIL-SPEC and validation suites do a
        lot to insure a consistent interpretation of the
        language across platforms and vendors.  No such
        validation or "frozen" specification exists for
        C++.  This causes lost time and less portability.

o       Ada's Packages and Generic Packages are a
        lot easier to design for than C++ classes.

o       Ada has better support for embedded systems'
        work than C++.  C++'s OO mechanisms
        (particurlarly dynamic binding) exact a performance
        penalty that will not be acceptable for some
        hard real-time systems.  This will be less
        important in the future, as hardware gets
        faster and applications get more complicated
        (thus requiring the complexity-management
        mechanisms offered by languages like C++).
        Ada 9X will probably suffer similar performance
        penalties on the same kinds of mechanisms.

**************************************************
*** CON ADA Comments *****************************
**************************************************

o	The language is too big for the few benefits over C++ that 
	it features.

o       Ada is a "weaker" language than C++ in expressing
        OO concepts (e.g. inheritance, polymorphism).
        Packages, Generic Packages and Ada's overloaded
        operators aren't enough.  Ada 9X will supposedly
        deal with these issues, but it will be at least a decade
        before the Ada 9X environment is truly widely
        available at a reasonable cost.

o	ADA compilers tend to cost real money.

o	ADA suffers from having way too many features -- probably 
	an artifact of the design-by-committee process.  It's such a
	huge language that a programmer may never fully "learn" it.

o	Converting code to ADA from anything is a problem.

o	ADA still tends to be slow, though that problem is slowly 
	going away.

o	Ada is only object-based (it has no inheritance), while 
	C++ _is_ object-oriented.


**************************************************
*** PRO C++ Comments *****************************
**************************************************

o       The dynamic binding, polymorphism and inheritance mechanisms 
	are *extremely* powerful, and very useful in graphical 
	applications.  Future enhancements including parameterized
        types (== Ada "Generic Packages") and exceptions 
	(== Ada exceptions) are going to be equally powerful.

o	After extensive reading and personal evaluation, I came to the 
	conclusion the ADA implementions are far worse than the C 
	implementations (I use the stuff from GNU, don't see how anyone 
	can write better software).

o	C++ compilers are cheap -- the GNU family is free, and runs 
	on a number of different architectures.  You can get the source 
	code so that you can fix it if it's broken.

o	C++ seems to be a reasonably clean design; the features tend to 
	be orthogonal and complete.  A competent programmer can probably 
	"learn" C++ pretty well in a month. 

o	Converting code from C to C++ isn't a big problem.  (And with 
	some of the Fortran-to-C translators that are publicly available,
	the Fortran->C->C++ path, while a bit of a pain, isn't 
	completely daunting.)

o	C++ runs just about as fast as C, i.e. it's plenty fast enough 
	to write things like volume renderers. 

**************************************************
*** CON C++ Comments *****************************
**************************************************

o	The tools for working with it maybe not as mature as ada tools.

o	C++ is hard to master.

o       C++ has reasonable OO mechanisms, but they
        are difficult to learn, and more difficult to use
        effectively.  This is partially due to the low
        quality of the documentation, which is quickly
        changing.





**************************************************
*** GENERAL Comments *****************************
**************************************************


o       There are a lot more Ada people out there, at
        the moment, than C++ people.  There will probably
        be a lot more C++ people in the future than Ada
        people, simply because the language is more
        accessable to more people (Gnu C++ is free, for
        example; "Turbo C++" costs ~$60; AT&T is
        very generous in licensing to Universities).


o       There will probably be a lot more C++ compilers
        available on a lot more platforms than Ada
        compilers in the future (the costs of validation
        are high; reuse of AT&T code  or GNU code
        is cheap).



I would like to thank the following for responding to my post :

baker@csl.dl.nec.com
blbates@aero36.larc.nasa
brendan@illyria.wpd.sgi.com
fmhv@inesc.inesc.pt
jansm@cih.hcuge.ch
jdt@voodoo.boeing.com
jls@netcom.com
jshumate@logdis1.wr.aflc.af.mil
leisner.henr801c@xerox.com
richard@elroy.Jpl.Nasa.Gov
rsk@gynko.circ.upenn.edu
uselton@nas.nasa.gov

-- 

*********************************************************************
Alan Dare                     |  Internet : alan@hal.larc.nasa.gov
NASA Langley Research Center  | 

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~1991-08-30  7:24 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-08-14 14:41 c++ vs ada results Fred Stluka
  -- strict thread matches above, loose matches on Subject: below --
1991-08-30  7:24 Ma ts Henricson
1991-08-29 16:54 David Emery
1991-08-16 17:56 Doug Smith
1991-08-15 15:40 Andy Davidson
1991-08-15 13:30 Paul Baker - CTA
1991-08-14 20:15 Jim Showalter
1991-08-14 19:15 Doug Smith
1991-08-14 18:40 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!utgpu!
1991-08-14 18:25 Doug Smith
1991-08-14  5:03 Mike Feldman
1991-08-13 22:08 David Emery
1991-08-13 14:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.e
1991-07-01  5:15 Andrew Dunstan
1991-06-27 18:24 Ray Diederich, 301-294-8400
1991-06-27 12:34 Chuck Shotton
     [not found] <164741@<1991Jun12>
1991-06-20 17:58 ` ryer
1991-06-24 14:44 ` ryer
1991-06-20 16:24 Chuck Shotton
1991-06-22  3:24 ` Thomas M. Breuel
1991-06-12 16:47 alan dare
1991-06-12 19:15 ` Paul Martz
1991-06-12 20:17 ` Jim Showalter
1991-06-13 20:49   ` Paul Kohlmiller
1991-06-13 23:12     ` Bruce Jones
1991-06-16  2:48   ` Russ Nelson
1991-06-16  4:10   ` Sean Eric Fagan
1991-06-18  4:17     ` Jim Showalter
1991-06-18  8:33       ` Sean Eric Fagan
1991-06-18 21:53         ` Jim Showalter
1991-06-18 12:28       ` Mats Henricson
1991-06-18 22:06         ` Jim Showalter
1991-06-19 15:07           ` Dan Weinreb
1991-06-19 17:00           ` Doug Smith
1991-06-20 14:08             ` Steve Juneau
1991-06-20 19:56               ` Robert I. Eachus
1991-06-21 17:27                 ` David M Geary
1991-06-20 22:09               ` Paul Stachour
1991-06-21 17:03                 ` David M Geary
1991-06-23  3:14                   ` Jim Showalter
1991-06-26 22:13                 ` Dan Weinreb
1991-06-21 22:01               ` Jim Showalter
1991-06-19 18:36           ` Jim Showalter
1991-06-19 15:01         ` Dan Weinreb
1991-06-24  2:29         ` Andrew Dunstan
1991-06-24 10:06           ` David Emery
1991-06-24 13:16           ` Mats Henricson
1991-06-25  4:29           ` Tom McClory
1991-06-26  0:35             ` Jim Showalter
1991-06-26  1:26             ` Andrew Dunstan
1991-06-26 22:47               ` Jim Showalter
1991-06-27 15:47                 ` Alex Blakemore
1991-06-27 23:58                   ` Jim Showalter
1991-06-25 19:27           ` Jim Showalter
1991-06-23 23:59       ` CBW Consulting
1991-06-24 20:11         ` Jim Showalter
1991-06-12 21:27 ` Dan L. Pierson

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