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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Rust's temporal safety for Ada/SPARK Date: Tue, 16 May 2017 16:36:53 -0500 Organization: JSA Research & Innovation Message-ID: References: <1c0e2c7c-4fd6-43d1-9848-f03e1a72bcb3@googlegroups.com> <40fc8c30-08d6-4456-a488-a1b28615953b@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1494970614 28286 24.196.82.226 (16 May 2017 21:36:54 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 16 May 2017 21:36:54 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:46800 Date: 2017-05-16T16:36:53-05:00 List-Id: 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" 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.