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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: The answer to "Can Ada replace FORTRAN for numerical computation? Date: Wed, 7 Aug 2019 09:35:30 +0300 Organization: Tidorum Ltd Message-ID: References: <3862f4a3-d3b2-4959-b6f4-08086738df2c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net mjftqfqKHxdn4H1BFoOVgAcWcsht0s1A2nvLtPcDMLDabdTVsz Cancel-Lock: sha1:g/uAQOR7IgHFi6RuDC44f00CLGI= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <3862f4a3-d3b2-4959-b6f4-08086738df2c@googlegroups.com> Xref: reader01.eternal-september.org comp.lang.ada:57003 Date: 2019-08-07T09:35:30+03:00 List-Id: On 19-08-05 20:15 , Optikos wrote: > On Monday, August 5, 2019 at 9:35:10 AM UTC-5, Shark8 wrote: >> On Saturday, August 3, 2019 at 6:30:36 AM UTC-6, Nasser M. Abbasi >> wrote: >>> There are also significant limitation to Ada as a language for >>> scientific computation, in particular with regard to dynamic >>> typing and storage allocation. >> >> I think this is referring to things like dynamically-sized arrays, >> rather than "X is an integer there, now it's a String!" when >> talking about dynamic-typing, as it's obvious that the latter would >> obliviate the aforementioned properties of finding conceptual >> errors. > > But there are 2 usages of considering something an integer for the > moment in a few lines of code. One is to floor-truncate a floating- > or fixed-point number to an integer; Ada supports syntax for this > semantic meaning. Yes of course. > But another is to consider a floating-point > representation as a machine-word to perform integer-based bit > twiddling to conform the representation of the floating-point number > to some machine requirements or machine representation that Ada's > syntax and semantics lacks; pre-1995 Ada (the subject matter of the > paper referenced) was abysmal at this commonplace use case in > Fortran, PL/I, and C. No, record types with representation clauses plus Unchecked_Conversion were fully able to handle this case, already in Ada 83. >> As to the storage-allocation, I suspect it is also referring to Ada >> arrays needing definite bounds in certain cases -- the ability to >> return properly-sized arrays from a function *should* be enough to >> ease this complaint *EXCEPT*, perhaps, when dealing with Very Large >> Arrays. They may also have been scared by the "Unchecked" in Unchecked_Deallocation. The identifier "free" is so much more friendly and safe-sounding... > Again, Ada has had a storage-pool wisdom at the heart of its storage > allocation strategies, but pre-1995 Ada staunchly lacked PL/I's and > Fortran's and C's ability to ecumenically reach out and > read/write/manipulate some other language's in-memory storage format, > as a I-got-you-covered system-programming duty. I doubt your statement. There is nothing in Fortran or C that supports "other languages' formats", and you can do any format manipulations you want with Ada 83 as well as with Fortran or C. Please show a counter-example if you insist on this point. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .