* Posts by MatthiasU

3 publicly visible posts • joined 1 Oct 2024

Rust-style safety model for C++ 'rejected' as profiles take priority

MatthiasU

The quote misses the "unless you add a ton of safe/unsafe wrappers, which we don't like because it violates our sense of esthetic purism" context.

While personally I'd call that attitude quite a lot of things, none of them would contain the word "sense" (unless negated).

The empire of C++ strikes back with Safe C++ blueprint

MatthiasU

Re: Memory safe C/C++ is good. But...

You don't want to catch "most" errors. You want to catch all of them, and you want to be able to prove that you did, even across library boundaries.

MatthiasU

Syntax schmyntax

From the proposal:

> Rust’s functions are safe by default. C++’s are unsafe by default. But that’s now just a syntax difference.

NO IT IS NOT.

Safety by default means you can use a simple "grep" to determine whether your program contains unsafe code. Unsafety by default means adapting any of this will be an uphill battle-

But I digress. By the time C++ gets somewhat close to Rust-level safety guarantees, "[un]safe" keyword or not, the complete Linux kernel will have been rewritten in Rust anyway.