Reply to post: Re: Another dimension of complexity

Latest patches show Rust for Linux project making great strides towards the kernel

DrXym

Re: Another dimension of complexity

Idiomatic C++ is kind of a unicorn thing since code is going to smear across time. Few projects are blessed (or cursed) to rewrite themselves to the latest C++ standard when one appears. And C++ code will probably need to call C libraries in places or will have C-esque code for one reason another, e.g. reading data into a buffer.

And even the latest C++ isn't going to enforce object lifetimes, thread safety etc. That doesn't even get into the traps that C++ lays in its language for the unwary - inadvertent copying, the rule of 3 (or 5), virtual destructors, implicit constructors, nullptr and all the rest.

So I don't see that it's hugely better. It's not hard to find CVEs in large mature codebases written in C++ along similar lines to those written in C.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon