this post was submitted on 14 Aug 2024
10 points (100.0% liked)
C++
1763 readers
1 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I like the problem solving description, I actually went through a similar learning process leading to bitset recently. It was very satisfying!
However, I just have to ask a question: What is the reason you didn't just use UUID?
Thanks!
It would have been a lot easier to generate a fresh UUID for every record, but that means storing it. And we would have a unique sequential id alongside a unique UUID, two different keys for the exact same data. It is doable, afterall it's just an additional 128bits for every record, but for the sake of it I wanted to not store an additional ID and be able to compute the UUID on the fly from the base sequential ID.
Ah, I didn't think about this. Thanks for the explanation!