How would you write that ?
I stick with an access type. In most cases the target is some tagged record so either calling a primitive operation or accessing a member requires no “.all” anyway. E.g. given:
type T is tagged record
I : Integer := 10;
end record;
type T_Ptr is access all T'Class; -- Or is access all T
procedure Foo (X : in out T);
and
P : T_Ptr := ...;
You can omit “.all”:
P.I
P.Foo;
If T were not tagged then in the second case you would need “.all”:
Foo (P.all);