|
I have no particular opinion on contracts per se, but I do think that the C++ committee is procrastinating by focusing on niche features like contracts instead of dealing with the urgent issues (namely packaging and memory safety) where C++ is losing to Rust. The rejection was a moment for them to reevaluate their priorities but it doesn't seem that they've gotten the message. |
There's a wisdom I got throughout life in various scenarios: You can't beat anyone in their own game. Currently memory safety is Rust's game. C++'s game is different: Being a high level language with tons of features, legacy (install base), a massive and well established ecosystem, and as a result of that shared knowledge.
Hence, from my personal perspective, C++ shall be C++. Getting useful features and cross-pollination is useful, but imitating or trying to beat something in its own game is waste of time and energy.
Because Rust and C++ are built different, and Rust's features doesn't replace battle-tested code. uutils shipped with 140CVEs at some point. That'll be my poster example for a very long time.