3 ms·
The UUID specs are still confusing (or at least were to me lol) because the words "version" and "variant" both just say that something changes, not what is chan
by Lammy 3y ago
The UUID specs are still confusing (or at least were to me lol) because the words "version" and "variant" both just say that something changes, not what is changing or why it's changing.
version from Latin vertere "to turn, turn back, be turned; convert, transform, translate; be changed"
variant from Latin variare "change, alter, make different,"
In my own UUID/GUID code I have taken to calling them "behavior" and "layout", respectively: https://github.com/okeeblow/DistorteD/blob/NEW%E2%80%85SENSATION/Globe%20Glitter/lib/globeglitter.rb#L66-L79 https://github.com/okeeblow/DistorteD/blob/NEW%E2%80%85SENSA...
- akira2501 3y ago4.1.1 The variant field determines the layout of the UUID. That is, the interpretation of all other bits in the UUID depends on the setting of the bits in the variant field. As such, it could more accurately be called a type field; we retain the original term for compatibility. 4.1.3 The version number is in the most significant 4 bits of the time stamp (bits 4 through 7 of the time_hi_and_version field). The following table lists the currently-defined versions for this UUID variant. The version is more accurately a sub-type; again, we retain the term for compatibility. It's recognized in the RFC and all you've done is broke compatibility for fashion.
- Lammy 3y agoNaming != compatibility. Nobody should be looking at my code except for me and it helps me remember it better so I'm not sorry 8)