My first argument is it is consistent, rust is strongly typed. (A, B) is not the same as (B, A). I find the consistency useful.
My second argument is that knowing the order is required for indexed-based matching. If you have (A | B) ref.0
refers to A and if you have (B | A) ref.0
would refer to B.
My third argument is this makes the generic cases consistent. consider
let anon_enum : (T | u8) = ...;
match anon_enum { // match anon_enum {
t : T => (), // ref.0(t) => (),
u : u8 => (), // ref.1(u) => (),
} // }
Now if anon_enum is T we would expect it to use the first branch, and if anon_enum is u8 we would expect it to use the second branch. But what if T is u8?
With an order dependent anonymous enum this is resolved. If anon_enum was set through T it would be in the first variant, and if anon_enum was set through u8 it would be in the second. The behavior is consistent, regardless of the concrete type of T.
However an order independent anonymous enum would have inconsistent behavior here. First of all it couldn't be indexed matched, it would only be type matched, and it would have to use the concrete types. So if anon_enum is T we should expect it to match on the first branch. but if T happens to be u8, well what branch do you run? If anon_enum is u8 do you run the u8 or T branch? if anon_enum is T do you run the u8 or T branch? Do you convert your u8 into T or your T into u8? You would be forced to change the type one way or another.
With order dependent anonymous enums I know that T will always match on the T branch and u8 will always match on the u8 branch, regardless of what T is. With order independent, T may match on the T branch and u8 may match on the u8 branch, but they may also match on the other branch. u8 may become T or T may become u8.