-
Type:
Change Request
-
Resolution: Not Persuasive
-
Priority:
Medium
-
Shorthand (FHIR)
-
0.12.0 [deprecated]
-
FHIR Infrastructure
-
Language Reference
-
3.2.2
-
-
Moesel/Rhodes 11-0-1
I am opposing the allowed possibility not to specify the element index and then to default it to [0]. This reduces readability and understandability of the specification. If I see a rule:
* name[0]\.given[1] = "Marie"
it gives me information on that name is an array and that I am assigning the firs element\. If I see a rule:
* name\.given[1] = "Marie"
then, without seying the declaration of name, I am under a faulse impression that name is a non-array type\. This them brings uncertainty about all of the properties not used with the index\. I can never be sure if they are of non-array type\. To check and every one of them for the exact type would require additional effort\.
So bringing this syntactic shugar into the spec saves one typing 3 characters and brings a whole lot uncertanty to all the other users of the entire spec\.
Another example then could be changing the property from non-array to array type\. With the paths allowing such defaults any rules using this property would keep working fine, not requiring any attention\. However "convenient", I see this as a "bad thing", as then the semantical menaning of the property has changed and one has to check each and every property use for correctness\. So, I do not find introducing such defaults well justified\.
Existing Wording:
If the index is omitted, the first element of the array ([0]) is assumed.
- is voted on by
-
BALLOT-12439 Negative - Bas van den Heuvel : 2020-May-SHORTHAND R1 STU
- Balloted