From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Rust's temporal safety for Ada/SPARK
Date: Tue, 16 May 2017 16:37:51 -0700 (PDT)
Date: 2017-05-16T16:37:51-07:00 [thread overview]
Message-ID: <33bea28a-f571-42bc-a2c6-0e01c02b0744@googlegroups.com> (raw)
In-Reply-To: <offrdl$rju$1@franka.jacob-sparre.dk>
On Tuesday, May 16, 2017 at 3:36:55 PM UTC-6, Randy Brukardt wrote:
> 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.)
Which is why we have access parameters in read/write/input/output as well as the generic-dispatching constructor, right? -- That's one of the biggest pain-points I'm having with SPARK: I want to be able to use stream-attributes AND have verification!
While the mode-specification in Ada is pretty great (describing data-flow rather than mechanics) it does lead to a pretty painful problem w/ classwide parameters: combined with how you constrained values/type-passing works you can't have a
Procedure Visitor( Item : in out Node'Class ) is
-- On some condition replace Item with value of Make_More_Specific_Node( Item )
and instead have to have a
Procedure Visitor( Item : in out access Node'Class ) is
-- On some condition replace Item.all with value of Make_More_Specific_Node( Item )
It's really quite irritating (and IMO disappointing) that "access" was added as a mode-indicator/-modifier.
next prev parent reply other threads:[~2017-05-16 23:37 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
2017-05-16 23:37 ` Shark8 [this message]
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