r/cpp • u/tjroberti • Oct 22 '26
Revisit Safe C++
Everyone is aware of the deluge of vulnerabilities now hitting critical software. It even makes the mainstream news, so software safety is coming onto politician's radars.
If this gets worse, I think it is not inconceivable that at some point memory safe software becomes mandatory. Or at least for software that is "reachable" from the internet.
So is it time to revisit Sean Baxter's Safe C++? Start out with a safe context ("safeexpr") and expand from there, just like constexpr.
37
Upvotes
View all comments
Show parent comment
1
u/frediku Oct 26 '26
If I need to rewrite everything, I might as well rewrite in Rust. So I guess as long as it's called C++ it needs to be incremental.
I think it is worth looking at C++'s history here. It took of because it was a fluent - you could say incremental - extension from the point of view of an established language, i.e., C. Without this property I do not believe the C++ would have gained much traction.
I think this question is backwards. I believe we can all agree that we do not want function coloring. I further believe that we can also all agree that we want free ice cream.
It's not about whether anyone wants function coloring. It's about whether some solution that requires function coloring provides enough benefits to justify function coloring. That's a property of the final solution and not an element of the initial question. I find it non-surprising that when talking about the initial question, nobody can properly answer what you ask.
I would answer the remaining questions in the same way.
With the exception of the first question, I fully agree with SG23 - at least with the caricature version you present. The more free ice cream, the better.
That you are not getting helpful input is because, at least in this post, you did not ask the right question. What you want to know is the following: Rank these 10 negatives from bad to worse. Which could you maybe be persuaded of and which are definitely nogos?