> >It was never clear to me why type declarations aren;t allowed in
> >the private part of a P.T. They are purely compilation-time
> >things and would not increase the execution overhead. What's
> >the rationale for excluding them?
>
>
> Here's a hint: they used to be called "protected records".
They follow the general rule against nesting type definitions inside other
type definitions. When you nest one type inside another, you end
up with a number of semantic "nasties" such as where are the predefined
operators declared, and what are the type equivalence rules.
Do you name the predefined operators by saying object."=" or type."="?
Does each object of the enclosing type have its own distinct nested type?
It could certainly all have been worked out, but as suggested by Pat above,
the issues are essentially the same for nesting type definitions
inside protected type definitions and for nesting them inside
record type definitions.
> Really!
-Tuck