!standard 12.07 (03) 02-10-06 AI95-00317/01 !class amendment !status Amendment 200Y 02-10-06 !status work item 02-10-06 !status received 02-10-06 !priority Medium !difficulty Low !subject Partial Parameter Lists for Formal Packages !summary A formal package may have a partially specified set of actual parameters. !problem When a generic has more than one formal package parameter, it is often important to link the two packages via their actuals. However, the only way to link the packages is to specify one with no actuals, and specify the other will all of its actuals. For example: generic with package Inst1 is new Gen1(<>); with package Inst2 is new Gen2(Inst1.A, Inst1.B, ...); ... package GP is ... The problem is that there may be some actuals of the second formal package which are *not* linked to the first one. The only way to deal with this is to add more formal parameters to the generic GP to specify the values for the remaining actual parameters. For example: generic type T1 is private; type T2 is private; with package Inst1 is new Gen1(<>); with package Inst2 is new Gen2(Inst1.A, Inst2.B, FT3 => T1, FT4 => T2); ... package GP is ... Unfortunately, this approach defeats much of the advantage of formal package parameters, which is to reduce the number of formals and simplify the usage of a generic. !proposal A formal package parameter may specify some, but not all, of its actual parameters. For example: generic with package Inst1 is new Gen1(<>); with package Inst2 is new Gen2(Inst1.A, Inst2.B, others => <>); ... package GP is ... The parameters which are not specified may be referenced by name as expanded names using the formal package as its prefix. For example, Inst2.FT3 and Inst2.FT4 may be used later in the formal generic part of GP or within the spec or body of GP. By contrast, the specified actuals may not be so named, to avoid confusion between the properties of the actual and those of the formal. Similarly, any implicit declarations associated with a given parameter of the formal package may be named using the formal package as a prefix may only when the actual for the parameter is *not* specified. With this proposal, the notation "(<>)" for its actual part is essentially a short-hand for "(others => <>)." !wording (*TBD*) !discussion This is intended to be a natural generalization of the two capabilities currently provided for specifying actual parameters of a formal package. By providing this "mid-point" where some but not all of the parameters are specified, the formal package capability becomes significantly more useful, without measurably increasing the complexity of supporting the capability. !examples !ACATS test !appendix ****************************************************************