Rationale for Ada 2005

John Barnes
Contents   Index   References   Search   Previous   Next 

4.1 Ada Issues: Structure and visibility

The WG9 guidance document [1] identifies the solution of the problem of mutually dependent types as one of the two specific issues that need to be addressed in devising Ada 2005.
Moreover the guidance document also emphasizes 
Improvements that will remedy shortcomings in Ada. It cites in particular improvements in OO features, specifically, adding a Java-like interface feature and improved interfacing to other OO languages. 
OO is largely about structure and visibility and so further improvements and in particular those that remedy shortcomings are desirable.
The following Ada Issues cover the relevant changes and are described in detail in this chapter:
217
Mutually recursive types – limited with
262
Access to private units in the private part
287
Limited aggregates allowed
318
Limited and anonymous access return types
326
Tagged incomplete types
412
Subtypes and renamings of incomplete entities 
These changes can be grouped as follows.
First there is the important solution to the problem of mutually dependent types across packages provided by the introduction of limited with clauses (217). Related changes are the introduction of tagged incomplete types (326) and the ability to have subtypes and renamings of incomplete views (412).
Another improvement to the visibility rules is the introduction of private with clauses (262).
There are some changes to aggregates. These were triggered by problems with limited types but apply to aggregates in general (part of 287).
An important area is that of limited types which are somewhat confused in Ada 95. There are two changes which permit limited values to be built in situ. One is the use of aggregates for initialization and the other is a more elaborate return statement which enables the construction of limited values when returning from a function (287, 318).

Contents   Index   References   Search   Previous   Next 
© 2005, 2006, 2007 John Barnes Informatics.
Sponsored in part by:
The Ada Resource Association and its member companies: ARA Members AdaCore Polyspace Technologies Praxis Critical Systems IBM Rational Sofcheck and   Ada-Europe:
Ada-Europe