Water is not wet. Human lacks water sensor. All the sensors we have a temperature ones so we sense "wet" as a combination of temperature and visual information. Close your eyes, touch water of your skin temperature and you won't sense it. It's not wet.
I have the same opinion. C++ was my first programming language I used at work. I feel that I was relatively proficient with it, but it was around 2005 I think. Since then I've mostly used other languages. Right now I feel I can use C with ease, in fact I periodically use it. But C++? I don't even dare.
I guess it's fine if one specializes on C++ programming only. But when one needs to use different languages and C++ is used sporadically, I feel like it might be substantially harder than other languages.
The problem with C are the parts that C++ already provides an alternative, regarding bounds checking, generic code with preprocessor tricks or now that _Generic thingie, stronger typed enumerations, heap allocations without sizeof math, automatic resource cleanups.
I would feel the opposite. I dare not write a program in C. The mentality of RAII and destructors for resource management is so ingrained that attempting to track resource use and lifetime in C would be nightmarish.
I prefer to use int16/int32/int64 IDs for primary keys and UUIDv4 for "visible" keys. So database always uses integer fields to refer to other rows and web API uses UUID.
So you can't generate more than 1000 UUIDs per second without skewing timestamp portion? That's not a lot. Bulk imports often require a lot more inserts.
You probably can't use that for streaming. Moment of UUID generation and moment of transaction commit are different, so it's very possible that even if your code generates UUIDs strictly sequentially; the observable sequence from the database will not be always sequential. I've been bitten by this once when I've used serial IDs and I don't think that UUIDv7 is any different in that regard.
When I have enough time, I'm usually using 125-bit ID which I convert to 25 alphanumeric characters (something like [A-Z0-9] excluding [IO01]).
Standard UUID length is 36 characters. So you have identifiers 11 characters less and they're actually a tiny bit more readable and writeable if you decide to type them for some reason.
reply