Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I agree, the 'microtype' pattern can be a good way of getting the type-checker to catch silly mistakes.
In Ada it's standard practice. In C++ you really need a library to do it easily, but there's a good one out there ready to go:
https://github.com/foonathan/type_safe/
Here’s a link to a description of ULID, for those like me who had never heard of it: https://github.com/ulid/spec
How does it compare to cuid [1]? If you know the differences, can you please explain them for those like me who do not know both?
[1] https://github.com/ericelliott/cuid
just make sure you have everything configured correctly on your system if using UUIDs:
https://github.com/ramsey/uuid/issues/80
In the types of systems that need UUIDs there is probably no easy way to check for collisions. The prospect of mystery data corruption with no ability to trace it down frightens the hell out of me.
The only reason that issue was reported is because someone was actually doing the collision checking. That's not going to be the norm in UUID systems. Think about it.
Related posts
- Weekly help thread
- eli5 With billions and billions of people over time, how can fingerprints be unique to each person. With the small amount of space, wouldn’t they eventually have to repeat the pattern?
- weird php results microtime/hrtime
- UUIDs are a wonderful invention
- What are types of bugs that only show up after thousands or millions of times of the code being run.