From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,66383f4b94d281e6 X-Google-Attributes: gid103376,public From: chris.morgan@baesema.co.uk (Chris Morgan) Subject: Re: Ada-95 Success Stories Date: 1996/06/03 Message-ID: #1/1 X-Deja-AN: 158266457 x-nntp-posting-host: baesema4.demon.co.uk references: <319a6322.2564997@news.cais.com> <4nv2ts$n8k@ns1.sw-eng.falls-church.va.us> <31a4eb29.1625999@news.cais.com> organization: BAeSEMA Limited. newsgroups: comp.lang.ada Date: 1996-06-03T00:00:00+00:00 List-Id: In article <31a4eb29.1625999@news.cais.com>, mdoernho@cais.com wrote: > OK, OK, so maybe I was too quick in asking for Ada-95 success stories. I don't think so, it's just that Usenet does not reach most of the "troops" :-) My own small contribution is this : I have experience in Ada and C++. Faced with a project to build a test suite for our command and control system, I recommended Ada95 and GNAT in the face of widespread expectation that we would have to use C since there is a lot of low-level mucking about, and also scepticism that Ada95 is ready yet. So far my suggestion has been entirely vindicated. The work is going well. Staff who are new to Ada find Ada95 and GNAT productive very quickly. Yes they have some criticisms, but when they went off on a C++ course to help them understand the C++ GUI the Ada will connect to, they came back shaking their heads saying they were glad they didn't have to touch it! (My reaction as well except I do have to touch it - yuck!) Initially I was asked to stay within Ada83 programming paradigms as we might have had to ditch GNAT and go back to a Ada83 compiler. Now however we have confidence in GNAT (especially with the support we get from ACT) and are gradually slipping in some new language features as appropriate. So far we've used stream_io, the 'valid attribute, some text_io routines that are new to Ada95, and I am experimenting with some tagged type definitions to allow us to replace some horrible variant programming with nice OOP. Since the C++ compiler for the GUI is the Sun one (not G++) I have connected it to the Ada with Ada stream_io. In the C++ I have overridden each iostream operator for our base types with raw reads and writes rather than ASCII and it works a treat. Simply using a named pipe in /tmp (Unix) gives a shared memory connection for good performance. About the only problem that has really held me up is that our Ada, being strongly typed, uses a lot of fixed point types. These do not travel well into the C or C++ domain since those languages do not support fixed point types. I briefly thought of making a C++ template to support fixed point types, but in the end my Ada thinks down to C level by converting into an integer with appropriate explicit scaling in the Ada/C++ interface. We're just getting into some real-time issues and here we are using some protected objects, but I am also finding that my experience of Ada83 tasking is helping a lot. Certainly it's easier than using OS based tasking from C. This work is giving us as a company confidence to put our large projects through an Ada95 compiler sooner rather than later as it looks like we could switch some of our software quite easily, and it looks like there could be major benefits. My conclusions are as follows : o Ada95 is great. o GNAT is more than ready for serious work right now, and the price is right. o If you know Ada, get familiar with Ada95 and the available implementations (GNAT, PowerAda, AdaMagic, ObjectAda) and consider transitioning as soon as possible - the next Ada95 success story could be yours! Naturally your mileage may vary (I think that's what the Americans would say). Chris Morgan