This turned out to add significant complexity to the gl-native implementation, and never took effect in gl-js due to a bug (https://github.com/mapbox/mapbox-gl-js/issues/3717). Removing it due to the complexity it would add to gl-native and other implementations, and the following additional rationales:
As a general principle: explicit is better than implicit.
Most users will not be constructing functions by hand anyway. For those that do:
Requiring "type": "categorical" is not an undue burden, especially when coupled with a hinting mechanism in the validator as implemented here.
Implicitly supplying "type": "categorical" for string domain values introduces a potentially surprising difference between "stops": [["1", 1], ["2", 2]] and "stops": [[1, 1], [2, 2]].
This turned out to add significant complexity to the gl-native implementation, and never took effect in gl-js due to a bug (https://github.com/mapbox/mapbox-gl-js/issues/3717). Removing it due to the complexity it would add to gl-native and other implementations, and the following additional rationales:
"type": "categorical"
is not an undue burden, especially when coupled with a hinting mechanism in the validator as implemented here."type": "categorical"
for string domain values introduces a potentially surprising difference between"stops": [["1", 1], ["2", 2]]
and"stops": [[1, 1], [2, 2]]
.Closes https://github.com/mapbox/mapbox-gl-js/issues/3717 Closes https://github.com/mapbox/mapbox-gl-js/issues/3948