I was stumbling over some issue when I evaluated if sequence was the right field for revisioning my payloads.
The sequence extension requires for sequence:
MUST be a non-empty lexicographically-orderable string
But then:
RECOMMENDED as monotonically increasing and contiguous
contiguous seems kinda fuzzy when looking at strings. And worse, the only given sequencetype is an (for some reason) unsigned 32-bit int, which
MUST start with a value of 1 and increase by 1 for each subsequent value
But if we simply turn our numbers into strings like "1", "2", ... and 10 the lexicographical order would (arguably) be 1, 10, 2, which is not what we want. We'd have to zero left-pad everything like 01, 02, 10, ... but then we'd have to zero-pad to the full legth (always 10 characters in total).
So is sequence required to be orderable but we'll just ignore the lexicographical order when sequencetype == Integer because it makes no sense?
What if sequence was of type string|number and just guaranteed a total order?
Why do we waste half of the space with a signed int? (Who'd use negative seq values, especially if the seq must start at 1?)
I was stumbling over some issue when I evaluated if
sequencewas the right field for revisioning my payloads.The sequence extension requires for
sequence:But then:
contiguousseems kinda fuzzy when looking at strings. And worse, the only givensequencetypeis an (for some reason)unsigned32-bit int, whichBut if we simply turn our numbers into strings like
"1","2", ... and10the lexicographical order would (arguably) be1, 10, 2, which is not what we want. We'd have to zero left-pad everything like01, 02, 10, ...but then we'd have to zero-pad to the full legth (always 10 characters in total).So is
sequencerequired to be orderable but we'll just ignore the lexicographical order whensequencetype == Integerbecause it makes no sense?What if
sequencewas of typestring|numberand just guaranteed a total order?Why do we waste half of the space with a
signedint? (Who'd use negative seq values, especially if the seq must start at 1?)