pat-rogers / Ada-202x-WG9-Informal-Review

This is the place for WG 9 members to submit informal comments on the 202x source document. (This is not the formal ballot that WG 9 will hold later in the process.)
0 stars 0 forks source link

8.3 (26/2) confusing mixture of rules #150

Open nholsti opened 3 years ago

nholsti commented 3 years ago

The paragraph starts by stating several rules for various things, and then says "These rules also apply to dispatching operators declared in the visible part of an instance of a generic unit". The part "these rules" is confusing, because some of the rules stated earlier in the paragraph apply to type extensions or to context clauses, neither of which seems relevant to declarations of dispatching operations. It seems that only the first rule stated in this paragraph, about non-overridable declarations, can apply to declarations of dispatching operations. It would be clearer to separate the rules for type extensions and context clauses into their own paragraphs (and, in the annotated RM, distribute the annotations accordingly).

On second thought, perhaps the point about the dispatching operations is that such an operation could be the "homograph of the library unit" that is involved in the rule for context clauses. But at least the rule about type extensions seems irrelevant to dispatching operations.

ARG-Editor commented 3 years ago

It's fairly clear from the AARM notes that both the first and third rules could apply to a dispatching operation (since compilation units can be a subprogram). And it is harmless (even if confusing) to apply the second rule in that case (it obviously only applies to types, so it doesn't ever trigger for a subprogram). As such, there is nothing actually wrong here, and this is old (Ada 2005) text. Thus this suggestion is out of bounds for this review and it is marked deferred. See issue #15 for more on this topic.