Normative: Permit serialization of BigInt by littledan · Pull Request #3480 · whatwg/html (original) (raw)

A: Undefined, Null, Boolean, Number, String, Symbol, Object
B: Undefined, Null, Boolean, Number, Symbol, String
C: Undefined, Null, Boolean, String, Symbol, Number, Object
D: Undefined, Null, Boolean, Number, String, Symbol, Object
E: Undefined, Null, Boolean, Number, String, Symbol, Object
F: Undefined, Null, Boolean, Number, String, Symbol, Object
G: Undefined, Null, Boolean, Number, String, Symbol, Object
H: Undefined, Null, Boolean, Number, String, Symbol, Object
I: Undefined, Null, Boolean, String, Symbol, Number, Object
J: Undefined, Null, Boolean, Number, String, Symbol, Object

So a fair bit of consistency, but also some variation.

About the only benefit I can think of for a consistent order is that it makes it easier to check by eye that some list (set of cases) is complete. Mind you, this benefit would increase as more types are added to the language.

About the only disadvantage I can think of is that if you're doing a case analysis, it might make more sense to the reader to describe the handling of Type X before that for Type Y, and those orderings might not be consistent over the whole spec.