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-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Attributes: gid103376,gid1094ba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!feednews.vanderbilt.edu!feed.news.qwest.net!nems.noaa.gov!not-for-mail From: Paul Van Delst Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: Ada vs Fortran for scientific applications Date: Mon, 22 May 2006 13:22:01 -0400 Organization: CIMSS@NOAA/NCEP/EMC Message-ID: References: NNTP-Posting-Host: lnx374.ncep.noaa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.nems.noaa.gov 1148321616 30133 140.90.192.92 (22 May 2006 18:13:36 GMT) X-Complaints-To: postmaster@noaa.gov NNTP-Posting-Date: Mon, 22 May 2006 18:13:36 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.8-1.4.1 (X11/20060420) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news2.google.com comp.lang.ada:4346 comp.lang.fortran:10088 Date: 2006-05-22T13:22:01-04:00 List-Id: Nasser Abbasi wrote: > "Dan Nagle" wrote in message > news:tHkcg.6937$kR6.484@trnddc05... > > >>>11) Operators on any types, including arrays. Define a matrix product as >>>"*"... >> >>How is Ada's operators for types better or worse than Fortran's? >>Is Ada's "*" operator better than Fortran's matmul()? >> > > I'll answer the easy one for now since I have not had my coffee yet: > > It is clear that > A*B > is easier to read and understand than > MATMUL(A,B) > would you not agree? Hello, At the risk of igniting a language war (not my intent) and/or exposing my ignorance of Ada, I find the former misleading. To me, A*B suggests a regular old multiplication of two arrays, rather than a matix multiplication. MATMUL(A,B) is definitely wordier but the intent is quite clear. Sufficient exposure is enough to adapt to the Ada meaning of A*B, but you specifically mentioned one as clearly easier to read and understand .... so I'm tossing in my 2cents worth. :o) If I had my druthers wrt succinctness, I'd use a different operator for matrix multiplication. Sort of like IDL where A#B or A##B signifies matrix multiplication (the two forms are, essentially, to avoid unnecessary transposing of the second matrix.) (I'm sure there's myriad reasons why a different operator is a bad idea.) cheers, paulv >>"Fortran" /= "FORTRAN 77" ;-) >> > Yes :), I was surprised to read that now FORTRAN is called Fortran, (only > one letter is uppercase). This is progress (I think). > > Nasser > > > > -- Paul van Delst Ride lots. CIMSS @ NOAA/NCEP/EMC Eddy Merckx Ph: (301)763-8000 x7748 Fax:(301)763-8545