Rationale for Ada 2005
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:
Mutually recursive types – limited with
Access to private units in the private part
Limited aggregates allowed
Limited and anonymous access return types
Tagged incomplete types
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).
© 2005, 2006 John Barnes Informatics.
Sponsored in part by: