Stream: implementers
Topic: SimpleQuantity data type rationale
Vassilis Kilintzis (Nov 26 2018 at 08:44):
Sorry to bring up an old issue (SimpleQuantity was introduced in DSTU2 QA Preview).
I am reviewing data types and i try to understand the rationale behind the introduction of SimpleQuantity.
So currently SimpleQuantity is described as "The comparator is not used on a SimpleQuantity" so the only semantic difference is the forced absence of Quantity.comparator. In that context i read in quantity.comparator in isModifier "If there is no comparator, then there is no modification of the value"
So as i understand a Quantity may refrain from having a comparator and in that case the semantics are clear... "..no modification of value".
Why simpleQuanity was introduced then?
In general optional properties do not introduce new data types (e.g. there is no defined variation of Quantity data type for those missing a Quantity.code)
thanks in advance.
Grahame Grieve (Nov 26 2018 at 09:45):
it's a convenient short cut for making the rule 'no comparator in this context'
Vassilis Kilintzis (Nov 26 2018 at 10:07):
Thank you Grahame , i understand the actual use , i only find weird that the option to omit comparator is already described in the quantity.comparator property. For example the introduction of Counts is easily justified since the is no explanation in Quantity what are the semantics of a Quantity without unit.
Vassilis Kilintzis (Nov 26 2018 at 10:22):
Another thing i noticed:
(writing here instead of a new stream)
"Defined Variations on Quantity
There are several additional data types that are specializations of Quantity that only introduce new restrictions on the existing elements defined as part of the Quantity data type. "
Why money is part of this? IMHO is should now be a distinct Complex data type since it has it's own properties .value, .currency and not a restriction on Quantity.value and Quantity.code as it was initially.
Grahame Grieve (Nov 26 2018 at 10:44):
how is money part of that? I'm not seeing any offending wording
Vassilis Kilintzis (Nov 26 2018 at 11:20):
sorry my mistake there is MoneyQuantity (which refers to the old Money) and Also "just" money as new complex data type "2.24.0.7 Money"
Grahame Grieve (Nov 26 2018 at 12:03):
yes
Last updated: Apr 12 2022 at 19:14 UTC