News for hackers. Stuff that matters.
Re:Comparing C and C++ usage and performance with a real wor... by pcwalton on Sunday September 03, 2017 @01:30PM (#15162648)
> D, Rust, OCaml, and a few other projects are interesting in this space since they provide some of the same benefits as C++ with respect to correctness and safety.

Can you name a correctness and safety benefit that C++ has that these programming languages do not?

Re:Comparing C and C++ usage and performance with a real wor... by humanrebar on Sunday September 03, 2017 @02:04PM (#15162846)
I didn't mean to imply that C++ was safer somehow. I just meant that those languages are also competing in that feature space in a way that C doesn't.

And, on a pedantic level, C++ competitors can't provide exactly the same benefits of C++ because they took different approaches.

What's a key design difference among these languages? Well, C++ can mostly just #include a C header file and go with it. The other languages provide FFI mechanisms, but they each require declarations of the FFI to match the compiled C code. So theoretically there's a little more room for errors in that translation, though I doubt that's a big concern on the whole. Each of those languages have more mature module systems, which should more than make up for keeping FFI interfaces in sync with C headers.

Re:Comparing C and C++ usage and performance with a real wor... by red75prime on Sunday September 03, 2017 @01:53PM (#15162769)
Probably there are no such benefits. But taking the less serious approach, LLVM's -fsanitize=undefined could be thought of as the one.