Ada-Rapporteur-Group / User-Community-Input

Ada User Community Input Working Group - Github Mirror Prototype
28 stars 1 forks source link

Small suggestion for Annotated Ada RM 3.7 (10.b/3) #103

Closed gusthoff closed 4 days ago

gusthoff commented 3 months ago

In the Annotated Ada RM 3.7 (10.b/3), we read: "Ramification: A (nonformal) limited private type can always have a default for an access discriminant, because having the default itself makes the type immutably limited. Such a private type must necessarily have a full type with the same access discriminant with a default, and thus the full type will always be immutably limited (if legal)."

This might be potentially misleading — even with the "(if legal)" indication — as one could understand that this part:

because having the default itself makes the type immutably limited

indicates that having a default for an access discriminant is enough to consider the type immutably limited.

In a separate conversation with Tucker Taft, he mentioned that 10.b/3 should probably say:

..., and thus the full type will need to be defined so that it is immutably limited, or else the access discriminant with a default will be illegal on the full type.

Jeff-Cousins commented 3 months ago

This might be potentially misleading — even with the "(if legal)" indication — as one could understand that this part: because having the default itself makes the type immutably limited * indicates that having a default for an access discriminant is enough to consider the type immutably limited.

That's how I would have interpreted it at first reading. Jeff


From: Gustavo A. Hoffmann @.> Sent: 21 July 2024 3:14 PM To: Ada-Rapporteur-Group/User-Community-Input @.> Cc: Subscribed @.***> Subject: [Ada-Rapporteur-Group/User-Community-Input] Small suggestion for Annotated Ada RM 3.7 (10.b/3) (Issue #103)

In the Annotated Ada RM 3.7 (10.b/3), we read: "Ramification: A (nonformal) limited private type can always have a default for an access discriminant, because having the default itself makes the type immutably limited. Such a private type must necessarily have a full type with the same access discriminant with a default, and thus the full type will always be immutably limited (if legal)."

This might be potentially misleading — even with the "(if legal)" indication — as one could understand that this part:

because having the default itself makes the type immutably limited

indicates that having a default for an access discriminant is enough to consider the type immutably limited.

In a separate conversation with Tucker Taft, he mentioned that 10.b/3 should probably say:

..., and thus the full type will need to be defined so that it is immutably limited, or else the access discriminant with a default will be illegal on the full type.

— Reply to this email directly, view it on GitHubhttps://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/103, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATWHQ3WLLU72SKEDW7KA5LLZNO63NAVCNFSM6AAAAABLG4VFRKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZDCNBSGQ2DANQ. You are receiving this because you are subscribed to this thread.

ARG-Editor commented 2 months ago

This might be potentially misleading — even with the "(if legal)" indication — as one could understand that this part:

because having the default itself makes the type immutably limited

This part looks redundant to me; we're immediately going to explain why this is the case. Indeed, it looks like something I would have written, where I repeat the same point multiple ways. Some editing seems necessary, probably just drop this part altogether. If we do that, the rest doesn't really need changing, although it never hurts to be clearer.

In a separate conversation with Tucker Taft, he mentioned that 10.b/3 should probably say:

..., and thus the full type will need to be defined so that it is immutably limited, or else the

access discriminant with a default will be illegal on the full type.

This looks a bit redundant, too. We've already mentioned "access discriminant with a default" in this sentence and the preceding one, we hardly need to keep saying it.

So I suggest: Ramification: A (nonformal) limited private type can always have a default for an access discriminant. Such a private type must necessarily have a full type with the same access discriminant with a default, and thus the full type will need to be defined so that it is immutably limited, or else the full type will be illegal.

Since this is an update to an AARM note, it doesn't require any ARG action. I'll store this thread into AI22-0005-1 (where AARM notes and non-normative stuff like index entries get recorded), and make the change to the draft AARM.

[I'll leave this issue open for a bit so people can complain about my fix if they feel the need. - Randy]

sttaft commented 2 months ago

Randy, your proposed rewording is fine with me.