The important thing to observe here is that qualified_expression
has moved from being a form of primary to
being a name.

We also note the addition of conditional_expression
and quantified_expression (both in parentheses)
as forms of primary as discussed earlier in
this chapter and the addition of generalized_reference
and generalized_indexing as forms of name.
These are used in the new forms of iterator
briefly alluded to at the end of the discussion on quantified expressions
and which will be discussed in Section 6.3.

Returning to qualified expressions, the main reason
for allowing them as names is to avoid unnecessary
conversions as mentioned in the Introduction (see 1.3.2).

A function call can
be used as a prefix and so a call returning
an array can be indexed as in

A := F(3)(7);

which assigns to A the
value of the 7th component of the array returned by the call of F.

Now suppose that F
is overloaded so that F(3) is ambiguous. The
normal solution to such ambiguities is to use qualification and write
Art'(F(3)) as in

A := Art'(F(3))(7); -- illegal in Ada 2005

but this is illegal
in Ada 2005 because a qualified expression is not a name
and so cannot be used as a prefix. What one
has to do in Ada 2005 is either copy the wretched array (really naughty)
or add a type conversion (a type conversion is a name)
thus

A := Art(Art'(F(3)))(7);

This is really gruesome;
but in Ada 2012, qualification is permitted as a name
so we can simply write

A := Art'(F(3))(7); -- OK in Ada 2012

Although a qualified expression is now classed as
a name rather than a primary,
a qualified variable is not considered to be a variable. As a consequence,
a qualified variable cannot be used as the destination of an assignment
or as an actual parameter corresponding to an out or in out
parameter. This would have added complexity for no useful purpose. Ambiguity
generally involves calls on overloaded functions, and the result of a
function call is always a constant, so ambiguous names of variables are
unlikely!

Other uses might involve
strings which can also give rise to ambiguities. For example