Rationale for Ada 2012
4.1 Overview of changes: Structure and visibility
The WG9 guidance document
[1]
does not specifically identify problems in this area other than through
a general exhortation to remedy shortcomings.
The following Ada Issues
cover the relevant changes and are described in detail in this chapter:
Constant return objects
Primitive subprograms are frozen with a tagged type
Extended return statements for class-wide functions
Aliased views of unaliased objects
Explicitly aliased parameters
In out parameters for functions
Detecting dangerous order dependencies
Use all type clause
Incomplete types as parameters and result
Incomplete types completed by partial views
Formal incomplete types
Default discriminants for limited tagged types
Accessibility of explicitly aliased parameters
Aliased views of extended return objects
Freezing of subprograms with incomplete parameters
These changes can be grouped as follows.
First there is the exciting business of allowing
parameters of all modes for functions (
143)
and the associated rules to prevent certain order dependences (
144).
Another change concerning parameters is permitting explicitly aliased
parameters (
142,
235).
There are then a number of improvements in the area
of incomplete types (
151,
162)
including the ability to permit them as formal generic parameters (
213,
296).
There are also related changes to the freezing rules (
19).
There is also a minor change regarding discriminants
(
213).
The existing two forms of use clause (use package
clause and use type clause) are augmented by a third form: the use all
type clause (
150).
Finally, there are a number of changes (corrections
really) to extended return statements which were introduced in Ada 2005
(
15,
32,
277).
An associated change is the introduction of the idea of an immutably
limited type (
53).
© 2011, 2012, 2013 John Barnes Informatics.
Sponsored in part by: