This issue continues an unfinished topic from Ada 2022. This issue was created to fulfill the ARG resolution of November 10, 2022.
Ada users often are surprised that prefixed views cannot be used for abstractions that aren't tagged. That can lead to abstractions being declared tagged for no reason other than wanting prefixed notation (arguably, this was the case with the containers).
AI12-0257-1 was created for this issue. No consensus was reached on how to proceed with this issue was reached in time to include a solution in Ada 2022.
We explored 4 possible solutions:
(1) Allow them on all types without restrictions.
(2) Allow them only on record types (tagged and untagged). (Presumably with a way to declare that a private type will be completed with a record.)
(3) Allow them on tagged types and untagged types with partial views.
(4) Allow them on record types and untagged types with partial views.
The !discussion of that AI has a breakdown of pros and cons for each of the above possibilities. The !appendix of the AI has a long discussion on the possibilities, as well.
This issue continues an unfinished topic from Ada 2022. This issue was created to fulfill the ARG resolution of November 10, 2022.
Ada users often are surprised that prefixed views cannot be used for abstractions that aren't tagged. That can lead to abstractions being declared tagged for no reason other than wanting prefixed notation (arguably, this was the case with the containers).
AI12-0257-1 was created for this issue. No consensus was reached on how to proceed with this issue was reached in time to include a solution in Ada 2022.
We explored 4 possible solutions:
(1) Allow them on all types without restrictions.
(2) Allow them only on record types (tagged and untagged). (Presumably with a way to declare that a private type will be completed with a record.)
(3) Allow them on tagged types and untagged types with partial views.
(4) Allow them on record types and untagged types with partial views.
The !discussion of that AI has a breakdown of pros and cons for each of the above possibilities. The !appendix of the AI has a long discussion on the possibilities, as well.