From: NRH@LPVE.AC.LP ("Nigel Houghton, La Palma Observatory")
Newsgroups: comp.lang.ada
Subject: AIPS and ADA
Date: 21 Jul 92 11:31:00 GMT
Distribution: world
Organization: The Internet

Some time ago (about April?) Greg Aharonian submitted the following re.
AIPS asking why they chose C++ instrad of Ada. Here is that information.
It s NOT intended to start another language war. As Greg asked, I thought
I'd find out the reasons. I believe that any CONSTRUCTIVE criticism made
of my submission will be received well by its author. If you feel the urge
to flame, perhaps you could mail me direct and keep it off the net?

>   In the war of language choice ancedotes, here is one for the C++ side.
>The National Radio Astronomy Observatory (NRAO) in Virginia has for many
>years developed,maintained and distributed a program called AIPS (Astronomical
>Image Processing System), used extensively by radio astronomers.
>   Over time, the program has grown in size to 600,000 lines of Fortran.
>Starting in January of 1992, a team of 13 software specialists are rebuilding
>the entire system, and are using C++ to create a modular, objected oriented
>system.
>
    Given that this is the type of large project Ada is great for, it seems
>someone should find out why they choose C++ instead of Ada.  Some of the
>reasons are obvious.  AIPS is a workstation based scientific application
>used mainly in the university environment, for which 80% of all current and
>near future codes are written in Fortran and C/C++.  Scientists outside of
>the DoD (and even many inside the DoD) have for the most part ignored Ada,
>so most current users who modify AIPS would be unable to do so.
>
    Another reason is that no one was around to make the case for Ada.
>With the DoD being the champion of Ada (a role most of its contractors have
>shunned), it will have to make better marketing efforts to convinve people
>to voluntarily switch their large systems to Ada.  For all of the science
>and engineering programming conferences that I goto, I have yet to see any
>Ada presence.
>
(material deleted)
>
Greg Aharonian
>Source Translation & Optimization
>
=============================================================================
The reasons for the adoption of C++ are not really documented; there
was a fair amount of discussion, and I'm not sure if I sent a summary
to you. The following is a slightly revised summary I sent to
someone last year.

Ada was considered, and although my own knowledge of it is pretty limited,
I think the objections can probably be summarised (not in any
particular order) thus:

  o  Not quite what we want - it has data encapsulation but
     polymorphism and inheritance are not there or are more difficult
     to make use of.  some of the OO purists often sneer at C++, but
     it has enough of what we want as OO pragmatists (see other items)!

  o  C++ has already taken-off for large-scale technical applications
     in the outside world, and is almost certainly more "mainstream"
     than Ada.  When we hire a programmer, it is usually
     more to difficult to find an Ada one, and besides, the defence
     sector would probably attract them with a better salary
     (at least in the U.S.) anyway!  Having said that, C++ programmers
     are becoming expensive, and the U.S. defence contractors are
     starting to switch.

  o  Cost; good development systems, or even just compilers,
     for Ada are expensive.  AIPS development sites may buy
     something like Saber C++, but those who simply wish to
     compile the system should be able to get away with something
     cheaper, or free, like g++ (the GNU version), although some
     preprocessing might be required for a non-standard system.

  o  Although C and C++ differ quite a lot in philosophy, there
     is a lot of C experience (and code) in the AIPS community
     which can be employed in a C++ project.  C and C++ will
     always allow you to get close to the system without kludges,
     at least in unix and family.

I've not doubt the theologians could argue further (and both ways).

FORTRAN 90 was the only other serious contender.  Lack of existence was
(and still is) a problem.  If it is successful, it will never be anything
other than a niche language suited to numeric processing rather than
building systems.

We haven't ruled out a FORTRAN interface to the AIPS++ kernel,
although that's likely to have a lower priority.  In addition, some
specialised hardware only supports FORTRAN for vector processing at
the moment, and it's possible that a library of routines (analogous to
the array-processor routines in the current AIPS) will be required for
such things, although the likes of Convex and Alliant already support
all their hardware features (vectorisation and parallelism) in C, and
others are moving in this direction.

The OO approach was felt to be appropriate for a moderately large
system (AIPS 1 is 600 - 700 k-lines), although we hadn't realised
that language is really secondary to this.

In order to implement a complete system, which must interface well
to the operating system, a C-based language seems
like the obvious choice, and thus C++ for OO implementation.

C++ is incredibly rich, and although a particular OO programming
model may initially seem difficult to implement, it's usually possible
to find a way.  However, this requires some discipline; people can't
write code in a "stream of conciousness" manner anymore.  This brings
me to your next question.

(material deleted)


AIPS++ still has a long way to go, and any code we've written so far
should be thrown away - it's no more than a combination of education
in the language and also prototyping of some ideas.  We produced about
15K lines in three weeks, but I believe that merely serves to
illustrate that lines of code should not be seen as a measure of
progress.  If the design is OK, you find that few, if any, serious
design decisions are made while coding.

I'd be interested to hear what you're doing.  This new approach often
meets with a lot of resistance, and many people are sceptical (quite
rightly, to some extent) of what we are doing.  Nevertheless, we have
to treat software development in a much more professional way than we
have (at least in off-line processing) in the past.


==============================================================================
Any views which I have expressed here as my own are not necssarily shared by my
employer. However, I've tried not to express my own views here, purely those
that have been passed on to me.

Nigel R Houghton, La Palma Observatory, Canary Islands
                  Phone 34-22-405500 Fax 34-22-463899

Email: Via SPAN   "28844::psi%lpva::nrh"@east.gsfc.nasa.gov

       or, if you can get to JANET in UK
                  uk.ac.cam.ast-star::nrh
=============================================================================
=============================================================================