Rationale for Ada 2012

John Barnes
Contents   Index   References   Search   Previous   Next 

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:
15
Constant return objects
19
Primitive subprograms are frozen with a tagged type
32
Extended return statements for class-wide functions
53
Aliased views of unaliased objects
142
Explicitly aliased parameters
143
In out parameters for functions
144
Detecting dangerous order dependencies
150
Use all type clause
151
Incomplete types as parameters and result
162
Incomplete types completed by partial views
213
Formal incomplete types
214
Default discriminants for limited tagged types
235
Accessibility of explicitly aliased parameters
277
Aliased views of extended return objects
296
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).

Contents   Index   References   Search   Previous   Next 
© 2011, 2012, 2013 John Barnes Informatics.
Sponsored in part by:
The Ada Resource Association:

    ARA
  AdaCore:


    AdaCore
and   Ada-Europe:

Ada-Europe