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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd3a5ba6349a6060 X-Google-Attributes: gid103376,public From: Dan Nagle Subject: Re: should I be interested in ada? Date: 1999/02/19 Message-ID: <36CD44CF.A61DAE96@erols.com>#1/1 X-Deja-AN: 446025123 Content-Transfer-Encoding: 7bit References: <7a72e6$g55$1@probity.mcc.ac.uk> <36C93BB4.1429@ecs.soton.ac.uk> <7afc1o$3mi$2@plug.news.pipex.net> <7afttr$7v3$1@nnrp1.dejanews.com> <7aganu$qsc$1@plug.news.pipex.net> <36CC11A1.C7A71642@hercii.mar.lmco.com> <7ahkn0$kab$1@plug.news.pipex.net> <36CC6AC0.25DBE56D@erols.com> <7aikfp$nhq$3@plug.news.pipex.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rcn.com X-Trace: 5l2mqmuOBiRUIog2a6jT60en4SzOZkjV5Y5vur0ks4I= Organization: Purple Sage Computing Solutions, Inc. Mime-Version: 1.0 Reply-To: dnagle@erols.com NNTP-Posting-Date: 19 Feb 1999 11:03:55 GMT Newsgroups: comp.lang.ada Date: 1999-02-19T11:03:55+00:00 List-Id: Hello, Nick Roberts wrote: > > Dan Nagle wrote in message <36CC6AC0.25DBE56D@erols.com>... > 'Raw floating point speed' is largely to do with the target architecture. > Those speed-critical operations which are not hard-wired or micro-coded are > carefully implemented in assembly. I don't believe there are any differences > in the opportunities for optimisation between Ada and Fortran (e.g. Ada > supports global variables, it just doesn't force them on you). Does Ada enforce anti-aliasing rules regarding the global variables? Do the Ada constructs which have been given as substitutes for Fortran 95 array syntax have an implied order of operation? I'll grant you that a modern programming language, Ada95 or Fortran95 can define operators and assignments to mimic f95 array syntax. Can Ada mimic f95 array _semantics_? If I use the Ada constructs, is there an implied order of evanualtion? If I say real, dimension( n, n) :: a, b ! f95-speak for 2 nxn arrays of reals and then say a = b ! f95 array assignment The order in which the assignments occur if unspecified. Thus, it may happen in parallel, or in _any_ order the compiler finds most optimal. Can any of the Ada constructs proposed deliver the semantics of f95 array operations? I really am simply courious. I see many things in Ada which I find attractive and I want to know about the optimization issues. > > Thus, the high-level language is, theoretically, completely immaterial. Of > course, in practice, you may well find Fortran compilers which have better > written libraries and/or better optimisation. And, of course, for > multi-processor targets, there are the (many!) parallelising Fortran > compilers. Unfortunately, autoparallelization is like automatic programming. It's just not all that good. Any reasonably competent programmer can beat the best autoparallelizer by a substantial margin. For truly _scalable_ solutions, one usually resorts to message passing (via mpi or pvm), and there simply are no automatic tools for using them. > > |I know Fortran fairly well, I'm learning Ada and like it so far. > |Right now, if I had to fly, I'd like the airplane to be designed > |in Fortran, with the fly-by-wire done in Ada. Just trying to use > |the right tool for the right job. > > Fortran is very much a general-purpose language now. But my curiosity is > piqued: for which part of flying an aeroplane would you consider Fortran to > be the 'right tool for the job'? Design. Fortran's speed will let the design engineer use a finer grid, which gives a better analysis, which makes for safer, quieter, etc. ariplanes. > > |Please feel free to enlighten me about Ada's optimization capabilities. > > This is an issue which happens to be close to my heart. I would like someone > to point out to me an optimisation that can be done in Fortran (or any other > general purpose imperative language) which cannot be done in Ada. There may > be such optimisations - I have an open mind - but I have never come across > any yet. I've tried to do that above. -- Cheers! Dan Nagle dnagle@erols.com