News for hackers. Stuff that matters.
Re:Catching use-after-move C++ bugs with Clang's consumed an... by arka2147483647 on Wednesday July 10, 2019 @01:05PM (#20403924)
The value borrow checker in Rust comes from the systemic ability of to eliminate an entire class of bugs.

The value these kinds of smart Cpp/Compiler features comes from the ability to eliminate some instances of bugs.

Which is great, and all, but I don't see that all of the great masses of Cpp code and libraries would be rewritten or annotated to use these new features.

Which will sadly leave the impact of these developments particial.

Re:Catching use-after-move C++ bugs with Clang's consumed an... by ethanhunt_ on Wednesday July 10, 2019 @06:19PM (#20407189)
While partially using annotations only allows you to eliminate /instances/ of bugs, if you completely apply the annotations then it can allow you to eliminate the entire class of bugs (theoretically). Consider nullabiliy in java.

> I don't see that all of the great masses of Cpp code and libraries would be rewritten or annotated to use these new features.

It's much more likely and tractable that C++ libraries will be annotated than that they'll be rewritten from scratch in Rust.

Re:Catching use-after-move C++ bugs with Clang's consumed an... by jononor on Wednesday July 10, 2019 @02:33PM (#20404899)
For Python there are tools that automatically add static-typing hints. One could imagine the same to add most of the annotations for existing C++ code, such that only some of the code must be manually annotated. For critical codebases one could also imagine a linter rule that insists on full coverage.

But sure, it is somewhat of an uphill struggle. Still a worthy goal, as I don't think we will get rid of the many massively popular C++ softwares anytime soon.