comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Lundquist <mark@rational.com>
Subject: Proposed Ada features (was Re: Array of Variant Records Question...)
Date: 1999/09/10
Date: 1999-09-10T00:00:00+00:00	[thread overview]
Message-ID: <37D955B5.A018835D@rational.com> (raw)
In-Reply-To: 7r8t21$ov5$1@nnrp1.deja.com

Robert Dewar wrote:

> In article <37d7c116@news1.prserv.net>,
>   "Matthew Heaney" <matthew_heaney@acm.org> wrote:
> > 1) access constant params

Yes.

And Matt, don't forget "is limited access"... As I recall you were the
one who mentioned this a while back, but for some reason it didn't make
your wish list (or, it's far enough behind "winning the lottery" not to
merit mention :-)  I have had exactly the same wish (for limited access
types, not the lottery :-)  and it came up in exactly the same
context: I was implementing a generic mixin for reference-counted
memory-managed objects, and the non-limitedness of the access type
breaks reference safety.

On the other hand, the unsafe access type would be useful for local
assignments (e.g. a swap) where you know that a
"lightweight" (uncounted) assignment will do.  So I'm equivocating a
little.  I couldn't think of a workaround that would ensure that you are
using the unsafe mechansim in a way that is in fact safe.

>

>

>
>
> > 2) the ability to cast away const w/o using
> Sys.Addr_To_Acc_Convs
>
> Sorry, no idea what this means

...from the speech of barbarians, there is no translation in our
tongue... :-) :-) :-) :-)

Here's my understanding of it.  I'm not at all sure that it's accurate,
maybe someone can help me out...
In C++, 'const' is more like an attribute of the type than of the
object.  Given an object of a 'const type' (typically a function
parameter), you can render that object assignable by means of a cast
(conversion) to a 'non-const type'.  In C you would use the "(type)"
syntax, and in C++ you would use the built-in template function
const_cast<type>().  This formula is known as "casting away const"
(because you are not really changing the type per se, just the
"constness").

What I haven't figured out is why you would want to do this.  Same with
"mutable".

> > 6) the ability to invoke a constructor/initializer for limited
> types in the
> > declarative region
>
> sorry, I do not know what you mean here, and I certainly
> do not know what a constructor is, example would be useful.

I think in Ada, it would just be a function call as an initialization
expression.  The idea is to allow this for limited types.





  parent reply	other threads:[~1999-09-10  0:00 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-08  0:00 Array of Variant Records Question Bruce Detter
1999-09-08  0:00 ` Thank you Bruce Detter
1999-09-08  0:00   ` Martin C. Carlisle
1999-09-08  0:00 ` Array of Variant Records Question Martin C. Carlisle
1999-09-08  0:00 ` Ted Dennison
1999-09-08  0:00 ` Matthew Heaney
1999-09-08  0:00   ` Mike Silva
1999-09-08  0:00     ` Matthew Heaney
1999-09-09  0:00       ` Robert Dewar
1999-09-09  0:00         ` Matthew Heaney
1999-09-09  0:00           ` Matthew Heaney
1999-09-09  0:00             ` Robert Dewar
1999-09-09  0:00             ` Mark Lundquist
1999-09-09  0:00           ` Robert Dewar
1999-09-09  0:00             ` Brian Rogoff
1999-09-13  0:00               ` Matthew Heaney
1999-09-13  0:00                 ` Brian Rogoff
1999-09-14  0:00                   ` Robert Dewar
1999-09-14  0:00                   ` Robert Dewar
1999-09-14  0:00                     ` Brian Rogoff
1999-09-13  0:00                 ` Robert A Duff
1999-09-13  0:00                   ` Matthew Heaney
1999-09-09  0:00             ` Matthew Heaney
1999-09-10  0:00               ` Robert Dewar
1999-09-10  0:00                 ` Mark Lundquist
1999-09-10  0:00                   ` Matthew Heaney
1999-09-11  0:00                     ` Jean-Pierre Rosen
1999-09-14  0:00                     ` "cast away const" (was Re: Array of Variant Records Question...) Mark Lundquist
     [not found]                     ` <wccd7viiv59.fsf@world.std.com>
     [not found]                       ` <7rrmqd$l89@drn.newsguy.com>
     [not found]                         ` <wcciu59n2uf.fsf@world.std.com>
1999-09-22  0:00                           ` Array of Variant Records Question Robert I. Eachus
1999-09-23  0:00                             ` Robert Dewar
1999-09-23  0:00                               ` Robert I. Eachus
1999-09-22  0:00                       ` Robert I. Eachus
1999-09-10  0:00               ` Mark Lundquist
1999-09-10  0:00                 ` Matthew Heaney
1999-09-11  0:00                 ` Robert Dewar
1999-09-11  0:00               ` Richard D Riehle
1999-09-13  0:00                 ` Hyman Rosen
1999-09-14  0:00                 ` Mark Lundquist
     [not found]                   ` <7roohh$s6r@dfw-ixnews7.ix.netcom.com>
     [not found]                     ` <37e01168@news1.prserv.net>
     [not found]                       ` <7rp86o$c6h@dfw-ixnews3.ix.netcom.com>
     [not found]                         ` <37E18CC6.C8D431B@rational.com>
     [not found]                           ` <7rs8bn$s6@dfw-ixnews4.ix.netcom.com>
     [not found]                             ` <37e2e58c@news1.prserv.net>
1999-09-22  0:00                               ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Richard D Riehle
1999-09-22  0:00                                 ` Mark Lundquist
1999-09-22  0:00                                   ` Mark Lundquist
1999-09-22  0:00                                 ` Matthew Heaney
1999-09-22  0:00                                   ` Richard D Riehle
1999-09-22  0:00                                     ` Matthew Heaney
1999-09-22  0:00                                     ` Matthew Heaney
1999-09-23  0:00                                       ` Vincent Marciante
1999-09-23  0:00                                         ` Matthew Heaney
1999-09-24  0:00                                       ` Robert A Duff
1999-09-25  0:00                                         ` Matthew Heaney
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-27  0:00                                         ` David Kristola
1999-09-23  0:00                                     ` Robert Dewar
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-28  0:00                                         ` Robert Dewar
1999-09-28  0:00                                           ` Richard D Riehle
1999-09-29  0:00                                             ` Robert A Duff
1999-09-29  0:00                                             ` Robert Dewar
1999-09-28  0:00                                         ` Robert Dewar
1999-09-28  0:00                                           ` "Competence" (was: 'constant functions' and access constant params) Ted Dennison
1999-09-28  0:00                                             ` Robert Dewar
     [not found]                             ` <wccemfxn15s.fsf@world.std.com>
1999-09-22  0:00                               ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Richard D Riehle
1999-09-10  0:00             ` Mark Lundquist [this message]
1999-09-10  0:00               ` Proposed Ada features " Matthew Heaney
1999-09-10  0:00                 ` tmoran
1999-09-09  0:00     ` Array of Variant Records Question Nick Roberts
1999-09-09  0:00       ` Robert Dewar
1999-09-09  0:00       ` Tucker Taft
1999-09-10  0:00         ` Nick Roberts
replies disabled

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