Open sttaft opened 10 months ago
➢ I would suggest we consider allowing omission of "=> True" only when the aspect denotes a value rather than an object or an expression of Boolean type
Sounds very sensible to me.
Jeff
Sent from Mail for Windows
Note that we explicitly disallowed this for Default_Value and Default_Component_Value, even being a value doesn't necessarily make it reasonable to omit the value. But I suppose that makes the most sense. It certainly does not make sense to omit the expression for a contract.
Ada RM 13.1.1(15/3) permits aspects of a Boolean type such as "Pack" and "Inline" to be written without an explicit aspect_definition part, such as:
or
However, it also (implicitly) permits the following:
type Rec is private with Default_Initial_Condition;
or
both of which seem quite confusing when reading source code.
I would suggest we consider allowing omission of "=> True" only when the aspect denotes a value rather than an object or an expression of Boolean type. Clearly this is not upward compatible, but the fix is trivial, and one could argue improves readability in all such cases.
The suggested modification of 13.1.1(15/3) would be: