Notes |
|
|
Draft resolution created. No modifications to the restriction a were made as omit is syntactically a value. New restriction c specifies dedicated rules for handling omit or omitted field occurring in the RHS.
Please check the proposed resolution. |
|
|
|
I don't get it. Since when is 'omit' not a template? It can be used both for unrestricted templates and for templates with omit-restriction.
I think this additional restriction is just a special case of the restriction before it. |
|
|
|
But, of course, the case with the optional field in a non-template-variable is relevant. |
|
|
|
The whole idea of the proposed restriction is to gather so far scattered or missing rules on handling the omit symbol and omitted non-template fields occuring on the RHS into one place. And you are right that the rule is mostly intended for non-template variables.
In case of templates occuring on the LHS, it describes the process how the overloaded omit literal and omitted field of a non-template variable become a matching symbol. The rule doesn't actually explicitly describe handling of the omit matching symbol on the RHS if the above mentioned transformation has already taken place. This is indeed covered by the restriction b.
I admit it might be partially overlapping with the restriction b, but the expression "reference to an omitted field" is mostly related to non-template variables. If you wish, I might extend this expression by adding "of non-template values" to it, but it will make the rule longer and won't give any actual benefit as there is actually no conflict with the restriction b. |
|
|
|
See my proposal in CR6678_resolution_v2.docx.
My intention was to collect rules on template LHS-s in item b) and turn item c) out: when the LHS is a mandatory-kind value, omit and omitted fields are not allowed.
I also found unambiguous "contains a reference to", because {f1:=1, f2:=omit} contains reference to omit, but is a simple record/set value.
Please look at how do you like it this way. |
|
|
|
I added a rule explaining the impact of referencing an omitted field on the right hand side of an assignment. |
|
|
|
OK with me. If no comment from Jacob, in the next session can be set to resolved. |
|
|
|
I do not understand this sentence:
"c) If the left-hand side of the assignment is a reference to a non-optional value object (i.e. a value definition, a mandatory field, a record/set of/array element, a union alternative, a value parameter), the left-hand side shall not be a reference to an omitted field or the omit symbol."
Should the first 'left-hand side' not be 'right-hand side'? |
|
|
|
The second one should be "right-hand side". Corrected in version 4. |
|
|
|
|