comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Rust's temporal safety for Ada/SPARK
Date: Sun, 14 May 2017 22:59:55 +0300
Date: 2017-05-14T22:59:55+03:00	[thread overview]
Message-ID: <enrr9rFm1kfU1@mid.individual.net> (raw)
In-Reply-To: <ofa4dh$15p$1@dont-email.me>

On 17-05-14 20:36 , Jeffrey R. Carter wrote:
> On 05/14/2017 06:46 PM, digitalkevlar@gmail.com wrote:
>>
>> So, can someone today use Ada in a straight-forward way to write
>> single- or
>> multi-threaded applications that are, in every use-case, totally
>> immune at
>> compile-time to use-after-free and double-free errors with zero, runtime
>> overhead? Or can it not do that?
>
> Of course this is possible.

Yes... if one does not have to meet stringent resource constraints 
(time, space) on limited HW.

> It's very rare for well designed Ada to need access types.

"Well designed" is of course subjective. The container library has made 
it practical to avoid access types in the application code, but then 
there are other potential run-time problems, such as "tampering" with 
the containers, which require run-time checks (and which are to some 
extent consequences of the use of access types within the container 
library).

> An overwhelming majority of applications can be
> implemented without ever writing "access".

I find it difficult to agree with that "overwhelming", at least if one 
includes the access types used under the covers in the container library.

Even in applications where heap allocation is forbidden, there are 
usually some dynamically allocated resources -- elements of "resource 
pools" such as message buffers -- with the corresponding 
application-defined "reference" data types, and the same problems of 
managing allocations over time. I don't know if Rust's memory-management 
scheme extends to such non-heap "references, however.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .


  reply	other threads:[~2017-05-14 19:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13 20:33 Rust's temporal safety for Ada/SPARK digitalkevlar
2017-05-13 21:19 ` Jeffrey R. Carter
2017-05-14 10:19   ` Niklas Holsti
2017-05-15 19:07   ` Simon Wright
2017-05-15 19:30     ` Jeffrey R. Carter
2017-05-17 21:21     ` moy
2017-05-14  3:24 ` Robert Eachus
2017-05-14 16:46 ` digitalkevlar
2017-05-14 17:18   ` Dmitry A. Kazakov
2017-05-14 17:36   ` Jeffrey R. Carter
2017-05-14 19:59     ` Niklas Holsti [this message]
2017-05-14 20:43       ` Simon Wright
2017-05-15  7:27         ` Dmitry A. Kazakov
2017-05-14 22:20       ` Dennis Lee Bieber
2017-05-15 16:23       ` Jeffrey R. Carter
2017-05-15 23:19     ` Randy Brukardt
2017-05-16 16:45       ` Shark8
2017-05-16 21:36         ` Randy Brukardt
2017-05-16 23:37           ` Shark8
2017-05-14 21:28 ` moy
2017-05-15 22:59 ` digitalkevlar
replies disabled

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