The Arcade developer Attribute Rule Calculation docs say:
When the attribute rule is evaluated for a dataset, the return value for the expression is cast to the field type of the output value. It is best practice to handle casting within the script for full control of casting behavior to Number, Date, or Text return types.
It sounds like that second sentence is implying that we only need to cast datatypes to the output type when the datatype is Number, Date, or Text.
Is that correct?
For example, for geometries, would we return Polyline(my_dictionary) -- and then rely on Arcade to automatically cast that polyline to a geometry?
Or is the fact that Polyline is a subtype of the Geometry type mean that Polyline is technically already a geometry?