comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Rust's temporal safety for Ada/SPARK
Date: Tue, 16 May 2017 16:36:53 -0500
Date: 2017-05-16T16:36:53-05:00	[thread overview]
Message-ID: <offrdl$rju$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 40fc8c30-08d6-4456-a488-a1b28615953b@googlegroups.com

My concern is that one almost always has to use access-to-classwide types in 
an Ada context as it is impossible to do "co-derivation" so that a type and 
its static reference type get derived together. One can use dispatching to 
cover some of the pain, but that of course is dynamic itself and can cause 
other issues. (And the problem is even worse if one uses an abstract handle 
as the containers do, as dispatching no longer is an option.)

Remember that Ada statically binds almost all OOP calls to bring with. The 
problem is that there is no way to derive two related types together, and it 
appears that is impossible in an OOP context. (It could be made to work --  
maybe -- for untagged types.)

                                  Randy.

"Shark8" <onewingedshark@gmail.com> wrote in message 
news:40fc8c30-08d6-4456-a488-a1b28615953b@googlegroups.com...
On Monday, May 15, 2017 at 5:19:45 PM UTC-6, Randy Brukardt wrote:
>
> I'm also very suspicious of any claims of new static rules simply because
> OOP pretty much forces dynamic checks if one uses references; strong 
> typing
> breaks down for that and everything essentially becomes dynamic. There
> probably aren't any dereference checks, but you end up with dynamic type
> checks instead (substantially worse). Best thing is to avoid references
> altogether (but of course that too reduces capability).
>
>                                   Randy.

But a lot of those dynamic checks can be eliminated altogether; this paper's 
20 years old and shows that up to 87% of indirect [dynamic] calls could be 
converted to direct [static] calls:
http://dabamirror.sci-hub.io/0907a19f84f6a6fc61cc0416a09a9958/fernndez1995.pdf

Granted, this *IS* at link-time; but a brief look at some of the similar 
and/or referencing articles gives me the slight [counterintuitive] 
impression that not everything about OOP need be dynamic. -- It'll take more 
time and energy to properly delve into the subject than I have at the 
moment, but some of the results have quite fascinating titles. 



  reply	other threads:[~2017-05-16 21:36 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
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 [this message]
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