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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,90c3c79963d78580 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-09 17:46:34 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!nntp.news.xara.net!xara.net!gxn.net!news5-gui.server.ntli.net!ntli.net!news11-gui.server.ntli.net.POSTED!not-for-mail Message-ID: <3AF9E3BF.D6D73BEA@linuxchip.demon.co.uk> From: Dr Adrian Wrigley X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.14-5.0smp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Numerical Computation and Ada95 References: <9dc4sh$ru5$1@ulysses.noc.ntua.gr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 10 May 2001 01:41:35 +0100 NNTP-Posting-Host: 62.253.132.124 X-Complaints-To: abuse@ntlworld.com X-Trace: news11-gui.server.ntli.net 989455290 62.253.132.124 (Thu, 10 May 2001 01:41:30 BST) NNTP-Posting-Date: Thu, 10 May 2001 01:41:30 BST Organization: ntl Cablemodem News Service Xref: newsfeed.google.com comp.lang.ada:7423 Date: 2001-05-10T01:41:35+01:00 List-Id: Hi, I believe that Ada95 is well suited to numerical programs. Although I have only used the "77" flavor of Fortran, and prefer C to C++, the usual advantages of Ada shine: Legible programs, more thorough correctness checks, etc. I would also add that Ada generics make it much easier to express the algorithms, without being burdened by instance specific details. If the code is algorithmicly rich, you'll get efficient, correct code in less time than the other languages mentioned, once you know the languages equally well. Interfacing to other language libraries is usually straightforward, but still more work than keeping it all in one language. If you're just bolting together other people's code, the pressure is always to use the same language as they do. Another thing I have found is that writing correct multi-threaded code is much easier with Ada95 than anything else I have used, making it simple to take advantage of multiprocessor machines, and concurrent computation and I/O. This could be of relevance with large memory problems going into swap a lot. The issue of performance is one of my biggest worries when choosing Ada95 over other languages, when speed is critical. Comments elsewhere in this thread suggest that this is not normally a problem, but I have found that great care is needed to avoid inocuous constructs which result in slow code. Sometimes this prevents writing the code in the most "natural" way. Things may be better now with the latest GNAT (I developed most of my performance-critical code under GNAT 3.11, 3.12). Of course, you need to take great care in C or C++ too. Fortran(77) seemed to be a lot more robust in performance terms, perhaps because it was quite limited in what you could do. Try some simple example comparisons in your proposed environments. They may not be representative, but at least you'll have some idea what to expect with "real" code. A lot will depend on whether you can "go it alone", or whether you need support from your colleagues, boss, customers etc., as well as the size of project and penalty for failure. If you are in a big department hooked on F90, or working on a major new project for your employer, the biggest risks may be political. You would need a lot of confidence, with sound justifications to introduce Ada. The skeptics will be convinced that all the problems you encounter are due to the use of Ada. Usually they'll be wrong. If you don't have the confidence to use Ada for a project, don't try. Go home and familiarize yourself with the technical issues surrounding the language on your own (Linux) machine. -- Adrian Wrigley