Version 1.2 of ais/ai-60217.txt

Unformatted version of ais/ai-60217.txt version 1.2
Other versions for file ais/ai-60217.txt

!standard 03.10.01 (02)          03-03-03 AI95-00217-07/00
!class amendment 03-03-03
!status work item 03-03-03
!status received 03-03-03
!priority Medium
!difficulty Hard
!subject Child type stubs
!summary
A new kind of incomplete type is proposed.
!problem
Ada allows mutually recursive types to be declared only if they are all declared within the same library unit. This can force all of the major data structures of a program into a single library unit, which is clearly undesirable in some situations.
The goal of the proposed feature is to allow mutual recursion among type declared in separate packages (types containing (pointers to) each other as components, and primitive operations with (pointers to) each other as parameters), and to do this in a way that doesn't place any undue restrictions on the programmer.
For mutually recursive types, it is valuable if subprogram parameters may be of the type itself, rather than only an access to the type. However, for most types, it may be necessary to see the full definition to know how parameters of the type are passed. However, because tagged types are always passed by reference, there is no implementation difficulty in allowing them to be used as parameters even when the full definition of the type is not available. Hence, it makes sense to relax the rule for using incomplete types that are known to be tagged, to allow them as formal and actual parameters, since from a code generation point of view they are essentially equivalent to access parameters.
!proposal
Tucker's "type C.T;".
!wording
!discussion
!example
!ACATS test
!appendix

Editor's note: Early discussion about this proposal can be found in
AI-217-05.

**************************************************************

[Editor's note: Mail about this proposal is not posted yet. Sorry.]

**************************************************************

Questions? Ask the ACAA Technical Agent