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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID 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: "Nick Roberts" Subject: Re: should I be interested in ada? Date: 1999/02/22 Message-ID: <7aslfp$gpq$1@plug.news.pipex.net>#1/1 X-Deja-AN: 447245781 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> <36CC3AEA.59E2@lanl.gov> <7ai502$6an$1@nnrp1.dejanews.com> <36CD8DBA.237C@lanl.gov> <7akvao$j5t$2@plug.news.pipex.net> <7aldu1$4q$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-02-22T00:00:00+00:00 List-Id: robert_dewar@my-dejanews.com wrote in message <7aldu1$4q$1@nnrp1.dejanews.com>... |In article <7akvao$j5t$2@plug.news.pipex.net>, | "Nick Roberts" wrote: | |> Reorder(X,J) | |> |> You've got to declare a utility procedure, certainly, but |> otherwise this is just as neat as the Fortran, surely? | |My goodness one would almost think that Nick was trying to |make Ada look bad by making dubious arguments. I am certainly not trying to do this! |First, the |Ada code is far uglier and less safe than the Fortran code, Hearsay. This is a totally subjective opinion (either way I suppose), isn't it? |I really cannot imagine anyone thinking otherwise. To be honest, I would be interested in seeing a greater variety of opinions (please!). Robert does not seem to have procduced any counter-argument to my point about the advantages of abstraction. |But |more importantly, the Ada code does not catch the semantics |of the FORALL at all, there is no parallelism at all in the |Ada code, and indeed it is quite likely that not even a |clever optimizer can bail this out, because, as always it |is the exceptions that get you in Ada (if an exception is |raised, the semantics dictate exactly which iterations of |the loop have occured and which have not). Nick has |conveniently ignored this in his thinking, but it turns |out to be absolutely crucial. All sorts of loops in Fortran |that can be assumed to be parallel by the optimizer even if |FORALL is not used CANNOT be assumed to be parallel in Ada |because of the exception issue. I think this point is essentially wrong, in that the cases where the Ada optimiser cannot produce code which is just as good (as the Fortran code with or without FORALL) will be very rare, in practice. Perhaps Robert should re-read RM95 11.6 (6). Only the intervention of an independant subprogram (in the loop) would cause the problems he suggests. In most code, there will be no such subprogram, but, anyway, in just about any speed critical code an independant subprogram can almost always be avoided (by changing the place its body is declared in the source text, or making it inline). |This means that FOR ALL is in a sense even more crucial |in Ada (which doesn't have it) than in Fortran 95 (which |does). | |All this was covered in rather excruciating detail in the |thread a few years ago about implementing FOR ALL in Ada. I never saw this thread: I shall have a little search on DN. [The trouble with DN is that there must be tens of thousands of posts per year, even on a 'signal-dense' NG like CLA. To review it all would be a Herculean task (give a smelly stables any day :-).] [BTW I would like to restate that I am very pleased - most gratified really - to see answers to my silly posts from the likes of Professor Dewar, a man who has a rare depth of experience in the field (of computer science and the development of programming languages). My personal philosophy is that the only way to learn is to make mistakes. To have your mistakes pointed out to you by the experts is a privilege. I say what I really think (you may have noticed ;-), and I do not give praise lightly.] ------------------------------------- Nick Roberts -------------------------------------