comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: The answer to "Can Ada replace FORTRAN for numerical computation?
Date: Wed, 7 Aug 2019 09:35:30 +0300
Date: 2019-08-07T09:35:30+03:00	[thread overview]
Message-ID: <gqv9pjFprvkU1@mid.individual.net> (raw)
In-Reply-To: <3862f4a3-d3b2-4959-b6f4-08086738df2c@googlegroups.com>

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
       .      @       .

  reply	other threads:[~2019-08-07  6:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22  4:38 The answer to "Can Ada replace FORTRAN for numerical computation? Nasser M. Abbasi
2019-07-22  5:53 ` Simon Wright
2019-07-22 10:32   ` Lucretia
2019-07-22 13:20     ` Simon Wright
2019-07-22 17:27       ` Lucretia
2019-07-24 23:45         ` Randy Brukardt
2019-08-15 16:45           ` Norman Worth
2019-08-15 19:07             ` Dmitry A. Kazakov
2019-08-16 18:29               ` Norman Worth
2019-08-16 19:23                 ` Dmitry A. Kazakov
2019-08-18 17:04                   ` Norman Worth
2019-07-23  1:35 ` Brad Moore
2019-07-23 23:42 ` Jerry
2019-08-03 12:30 ` Nasser M. Abbasi
2019-08-05 14:35   ` Shark8
2019-08-05 17:15     ` Optikos
2019-08-07  6:35       ` Niklas Holsti [this message]
2019-08-07 20:42         ` Optikos
2019-08-16 19:11           ` Norman Worth
2019-08-16 20:15             ` Jeffrey R. Carter
2019-08-17  2:38             ` robin.vowels
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox