comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Generic access type convention and aliasing
Date: Wed, 08 May 2013 13:28:25 +0200
Date: 2013-05-08T13:28:25+02:00	[thread overview]
Message-ID: <op.wwrjhnq0ule2fv@cardamome> (raw)
In-Reply-To: op.wwqiolpeule2fv@cardamome

Le Wed, 08 May 2013 00:13:23 +0200, Yannick Duchêne (Hibou57)  
<yannick_duchene@yahoo.fr> a écrit:

> I feel there is no way to solve it or I want too much, and I should stop  
> searching and go with the storage specific access discriminant (so no  
> implicit dereference), and use some kind of external static check. At  
> least storage specific access type offers a tiny bit more protection  
> than general access, […]

Not just “a tiny bit”, rather enough finally: I may simply disallow the  
use of any general access type and also disallow instantiation of this  
pool specific access type outside of the package which declares it, and  
that will be a job for AdaControl :) With that check made aside of the  
compilation, I'm sure no copy of an access of this type is ever made, as a  
pool specific access type cannot be converted to another pool specific  
access type, except if can be converted to a general access type, and  
that's why I will disallow general access types (any way, won't need  
this). With these two restrictions, I'm sure I can assert no copy is made,  
except in the [generic] package which “own” this type.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



  reply	other threads:[~2013-05-08 11:28 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) [this message]
2013-05-08 20:44               ` Randy Brukardt
replies disabled

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