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
Show All Mail Headers

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

Print Reply
Subject:
From:
Roger Racine <[log in to unmask]>
Reply To:
Roger Racine <[log in to unmask]>
Date:
Mon, 20 Dec 2004 08:21:28 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
> > Ok #3 in our series of questios that will make their way in to future
> > articles, FAQs, etc.
> >
> > Why would I want to use Ada for small projects?
> >
> > David Botton

To be a bit less biased than those who have responded so far, and to be a
devil's advocate (to make people think about how to really convince those
Java and C++ people to use Ada), I would like to challenge people to think
about some realistic counter-arguments:

1) Standard Template Library for C++.  A colleague was writing a small
simulation, and decided on C++ because he had a book that explained how to
use STL (and he knew C++).  While I could have said that it is possible to
write an Ada interface to STL, that would have taken extra time.  Would the
use of Ada really have saved time in the end?  In this case I could not
make the case when he started, and I cannot make the case now, since the
simulation is working very well (it was really a wrapper that calls
existing software written in C, so it is quite simple code).

2) Ease of building GUI applications in Java.  My son took the AP software
course in high school, which uses Java, which allowed me to look at the
capabilities of the tools.  While I would not advocate the use of Java for
an initial programming course, the ease with which it was possible to make
GUI applications, and the capabilities of the IDE seemed to be well beyond
the similar capabilities of Ada (especially given a small budget).

3) While Ada, C, and C++ can work together, when they don't work, it is
difficult to debug the program.  I tried writing a multi-language test
program, and started out using the version of GCC and GDB that came with
Red Hat 9.0, and found that it was difficult to step through the program
when it switched back and forth from Ada to C.  I tried to upgrade GCC and
GDB, but that caused other problems within GDB (is there any web site that
explains which version of GDB goes with which version of GCC?).  On a large
project that could afford a support contract, I am sure the vendor would
have been able to help, probably quite quickly, but for a small project the
cost is prohibitive.  Again, using my recent experience, since the software
was fairly simple, and since I am quite careful, we have not seen too many
of the problems normally seen with using C (amazingly, we have not had a
pointer problem or an array out of bounds problem yet).  I finally gave up
and used C (which was necessary for the delivered software,
unfortunately).  The debugger works quite nicely with the C++ and C code.

Please don't get me wrong, and think that I have stopped advocating Ada
(this has happened before when I played devil's advocate).  I am using Ada
for a small research project.  I know how to use the existing libraries for
Ada and have my own from previous projects.  But my use of Ada on that
project has no C and no GUI interface.  I have used Claw (trademark?) for a
GUI program on Windows, but my version (which I won at an Ada conference
many years ago) does not work any longer since going to Windows XP.  And I
would prefer something that works on multiple platforms.


Roger Racine
Draper Laboratory, MS 31
555 Technology Sq.
Cambridge, MA 02139, USA
617-258-2489
617-258-3939 Fax

ATOM RSS1 RSS2