Closed Lightning00Blade closed 8 months ago
"Firefox and Chrome return strings" seems like a good justification BTW. But do they return strings that represent integers? If so it seems unfortunate because people will probably do parseInt
on those strings and we might need to specify that it's the string representation of an integer.
"Firefox and Chrome return strings" seems like a good justification BTW. But do they return strings that represent integers? If so it seems unfortunate because people will probably do
parseInt
on those strings and we might need to specify that it's the string representation of an integer.
Oh, we do it totally wrong then. In Firefox we send a UUID as value for internalId
so we probably wouldn't mind such a change. Interestingly no-one reported that problem yet, so I assume it's most likely not really in use as a number by clients.
If we're returning a UUID already that somewhat alleviates the concern (we can just change the prose to say "globally unique string"). My worry is that in cases where we just say "return a string" and everyone is returning (say) an integer then clients depend on it being an integer.
I still worry a bit that we'll find cases where any client returning a string in a known, but unspecified, format will cause authors to depend on that format (e.g. Chrome returning the string representation of an integer will cause people to write tests that depend on the string representing an integer), but so far I don't think we have consensus that all ids should be UUIDs to avoid this problem.
We are fine with making internalId
a UUID
.
Let internal id be a unique across the internalId fields of the values of serialization internal map integer.
Let internal id be the string representation of a UUID based on truly random, or pseudo-random numbers.
@jgraham can you please update your review status? Merging is blocked because you requested changes. Thanks!
We always define Ids as text, this is an exception, we should change this. Note: Both Chromium and Firefox return strings atm
Preview | Diff