comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Generic access type convention and aliasing
Date: Wed, 8 May 2013 15:44:04 -0500
Date: 2013-05-08T15:44:04-05:00	[thread overview]
Message-ID: <kmedel$f86$1@loke.gir.dk> (raw)
In-Reply-To: op.wwqiolpeule2fv@cardamome

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]

"Yannick Duch�ne (Hibou57)" <yannick_duchene@yahoo.fr> wrote in message 
news:op.wwqiolpeule2fv@cardamome...
>Le Tue, 07 May 2013 23:03:17 +0200, Jacob Sparre Andersen news 
><randy@rrsoftware.com> a �crit:
...
>> Moreover, the use of access parameters and SAOAATs should be avoided
>
>What is "SAOAATs"?

A Baird-ism that the ARG has adopted: "Stand-Alone Object of an Anonymous 
Access Type". There's no shorter way to refer to it (I did write it out at 
the beginning of my message, but I wan't going to repeat that over and over 
...)

>> unless you really need dynamic accessibility.

>What I'm trying to achieve, is to have access to the object storage 
>designated by the access, while preventing manipulation (including copying 
>at any life-time scope) of this access value, only dereference. The only 
>way I know to achieve this, is by passing `Element.all` to an 
>out/in-out/in parameter of a callback, but I would like to avoid control 
>inversion (this breaks the flow).

My point was that you get the static checks you want so long as no access 
parameters and SAOAATs exist in your program. (They're accessibility checks, 
but are required to be made at compile-time.) You could use AdaControl or 
even restrictions pragmas to enforce that.

That's probably better than trying to "roll-your-own" checks. OTOH, the 
strategy you laid out after the above quote might be better for other 
reasons.

                                             Randy.






      parent reply	other threads:[~2013-05-08 20:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06  0:20 Generic access type convention and aliasing Yannick Duchêne (Hibou57)
2013-05-06  5:55 ` Yannick Duchêne (Hibou57)
2013-05-07  0:56   ` Randy Brukardt
2013-05-07  6:02     ` Yannick Duchêne (Hibou57)
2013-05-07  6:42       ` Yannick Duchêne (Hibou57)
2013-05-07 17:34       ` AdaMagica
2013-05-07 19:08         ` Yannick Duchêne (Hibou57)
2013-05-07 21:03           ` Jacob Sparre Andersen news
2013-05-07 22:13             ` Yannick Duchêne (Hibou57)
2013-05-08 11:28               ` Yannick Duchêne (Hibou57)
2013-05-08 20:44               ` Randy Brukardt [this message]
replies disabled

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