Open stevenroose opened 7 years ago
This is just a space optimization in the encoding. It adds no value to have the type in two places.
It is a bitmap, though, so it will most likely not increase the size of the encoding.
But it feels weird that a condition that has subconditions of types A, B and C will have a subtypes set either (A, B, C) or (A, B) or (A, C) or (B, C) depending of its own type. Even though the subconditions are the same.
I don't see any direct problems with that, though. Other than not being very intuitive.
The spec says this:
If the root type is excluded, though. The subtypes set no longer represents all the types of the sub-conditions. In that case it's more like an "extra required types" field in that case.
For implementers it's only a minor issue (it means adding all subtypes recursively and removing the root type again in case it's also a subtype), but it's a little bit confusing.