Closed nthykier closed 4 years ago
@Ede123 Did you have a chance to review this?
Sorry, my availability varies these days and I'm usually busy on the weekends. I'll try to find some time to review (hopefully soon).
Thanks for this, I've just merged the bug fix in the first commit in f0788d5c0d49ee93e2aad44654cbc4ab22ffa70b .
I have to think a bit about the second commit (Support uppercase letters in generated IDs) - while it's obviously true we can save some bytes by using upper case characters it adds ambiguity ("a" vs "A" might be a different code point but it's still the same letter). Also, as you mention yourself, if we wanted to maximize the number of possible IDs we could allow a lot more characters and squeeze even more bytes out of it (at the cost of legibility).
Feel free to open a new issue about this so we can discuss a bit, if you think optimizing ID generation is a worthwhile task.
This PR solves #256, which is really two issues combined:
renameID
where if two IDs were swapped (AA <=> a
), then all references would end up in one of the IDs (rather than correctly split between the two).a-z
) for IDs. This branch bumps it to 52 (a-zA-Z
), which solves the size issue in #256. Though in theory it can be increased even further (e.g.0-9
can be used from character 2 and later in the ID) - this is left as future work.Closes: #256