News for hackers. Stuff that matters.
Re:Chad Strings – The Chad way to handle strings in C by junon on Thursday May 20, 2021 @09:37AM (#27220935)
C can be verified quite easily. C++ cannot. Therefore, it is possible to write code safer than C++, Rust or Go, in C.

But sure, keep spewing your incorrect assertions.

Re:Chad Strings – The Chad way to handle strings in C by quotemstr on Friday May 21, 2021 @01:24AM (#27230785)
> C can be verified quite easily. C++ cannot.

Uh, exactly the same kind of static analysis that applies to C applies just as well to C++. C++ doesn't have a magically different execution model. What do you think std::string is except a few wrapper functions that boil down to the same operations you can do in C?

Re:Chad Strings – The Chad way to handle strings in C by junon on Friday May 21, 2021 @01:47AM (#27230903)
Note the term "easily". C++ verifiers have to understand template types, overloads, etc.

I'm sure we'll get there one day. Frama-C is inching toward it at molasses speeds.

But right now, C is undeniably easier to verify than C++.

Re:Chad Strings – The Chad way to handle strings in C by quotemstr on Friday May 21, 2021 @03:08AM (#27231297)
> C++ verifiers have to understand template types, overloads, etc.

If they operate at some compiler IR level (e.g. LLVM bitcode), the difference between C and C++ verification is nothing. C++ is purely a front-end thing. Why should formal verifiers operate at the AST level?