comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Charles container library usage examples
Date: Fri, 23 Sep 2005 19:05:02 -0500
Date: 2005-09-23T19:05:02-05:00	[thread overview]
Message-ID: <Tv6dnQZuTZkPBaneRVn-pQ@megapath.net> (raw)
In-Reply-To: 1125991591.402272.176230@g47g2000cwa.googlegroups.com

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

"Ludovic Brenta" <ludovic@ludovic-brenta.org> wrote in message
news:1125991591.402272.176230@g47g2000cwa.googlegroups.com...
>David Trudgett a �crit :
>> >> 2. Did I need the separate file "corner_list.ads"? I tried to put it
>> >>    in "side_corners_map.ads", but the compiler didn't seem to like
>> >>    that idea.
>> >
>> > Yes, you need one because Side_Corner_Maps must be instantiated at
>> > "library level".  This prevents dangling references to nested types.
>>
>> OK ;-) I'll take your word for it... ;-)
>
>Somebody else might elaborate on how Ada 200y is making this rule more
>subtle, so that library level instantiations are no longer necessary
>in some cases; I'm actually curious to better understand this change.
>Anyone?

The quicky answer (now that I'm back from vacation and catching up here):
Tucker Taft did an analysis and determined that the only cases where a
(tagged) object could outlive its type were (1) objects that were returned;
(2) objects that were allocated (for outer access types). Thus, it made
sense to move the accessibility checks to those two locations, and allow the
(nested) type extensions and objects of them (except in the previous two
cases).

This makes a ton of sense from a usability prespective (its too bad that it
wasn't realized for Ada 95), but it does make type extensions significantly
harder to implement.

                             Randy.



--
Ludovic Brenta.






  reply	other threads:[~2005-09-24  0:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-03  2:38 Charles container library usage examples David Trudgett
2005-09-03  5:15 ` Matthew Heaney
2005-09-03  9:45   ` Simon Wright
2005-09-04  6:25     ` David Trudgett
2005-09-05 11:28       ` Georg Bauhaus
2005-09-04  0:26   ` David Trudgett
2005-09-04  9:49     ` Matthew Heaney
2005-09-06  3:01       ` David Trudgett
2005-09-06 16:22         ` Jeffrey Carter
2005-09-07  0:15         ` Matthew Heaney
2005-09-04 17:19     ` Ludovic Brenta
2005-09-06  3:01       ` David Trudgett
2005-09-06  5:08         ` Ludovic Brenta
2005-09-06  6:46           ` David Trudgett
2005-09-06  7:26             ` Ludovic Brenta
2005-09-24  0:05               ` Randy Brukardt [this message]
2005-09-09 14:57         ` James Alan Farrell
2005-09-10  7:38           ` David Trudgett
2005-09-10 14:55             ` Matthew Heaney
2005-09-10 15:26               ` Ludovic Brenta
2005-09-10 17:58                 ` Matthew Heaney
2005-09-12  0:24               ` Robert A Duff
2005-09-11 10:52             ` Georg Bauhaus
2005-09-11 21:14               ` David Trudgett
2005-09-13 23:41                 ` Björn Persson
2005-09-14  6:39                   ` David Trudgett
2005-09-12  0:21             ` Robert A Duff
2005-09-12  0:57               ` David Trudgett
2005-09-12  1:01                 ` Robert A Duff
replies disabled

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