While this may work as a rough heuristic, it's not true in theory nor in practice. First example that comes to mind: Rust has proper sum types (Called enums), which are used everywhere, and C++ doesn't have anything like it.
While this may work as a rough heuristic, it's not true in theory nor in practice. First example that comes to mind: Rust has proper sum types (Called enums), which are used everywhere, and C++ doesn't have anything like it.
In C++ everything is just more awkward since everything is bolted on as an afterthought in the stdlib but then lacking language syntax sugar to make its usage convenient.
E.g. the (somewhat weird looking) equivalent to Rust's match is called 'visit' in C++:
Just search for the various revisions,
I've had a quick look at one of the proposals behind the link and it's no comparison with the existing Rust way. Even std::variant itself is a crutch (being templatized by a list of types), not comparible with true algebraic datatypes.
I'm sure you could technically emulate all this in C++ is you keep throwing template metaprogramming at it, but at that point anything is a C++ subset and the statement loses all pratical meaning.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p26...
That is the thing with committee driven languages, with multiple vendor implementations.
Not everyone is on the same room voting for the same features, and not everyone is implementing the features in any specific order.
By the way, I would rather have Safe C++ than profiles, but do not vote, so whatever.
It has hardly moved since 1989, and annex K doesn't count, given its broken design.
Anyway I am still mostly stuck with .NET Framework, Java 17, node 20 in many commercial deployments, so it isn't like everyone cares that much to update to latest, given existing business decisions.
Those kind of industries don't care about programming language featurities anyway.
pattern matching had a poll in forwarding to the CWG, and it was mostly in favor, though enough were against it to not reach consensus
profiles had a poll in forwarding to the CWG, and it was split down the line in terms of for/against.
Given the previous votes on profiles being nearly unanimously for, I'm interested to see what people have to say about what went on.
By the way, ever noticed that after C89, neither Ritchie nor Dennis ever had anything else to do with how WG14, or the compiler industry vendors, decided to take C onwards?
The original Plan 9 C compiler isn't even standards compliant.