29 ms·
Any improvements to C++'s safety are welcome, because there are huge and important existing C++ code bases. Using C++ for a greenfield project today should req
by nine_k 4y ago
Any improvements to C++'s safety are welcome, because there are huge and important existing C++ code bases.
Using C++ for a greenfield project today should require some very good justification though.
- carlmr 4y agoExactly, For small-ish tools RiiR works, but not for large proven-in-use codebases. While a rewrite would probably squash memory errors you would often get logic errors because you forgot to port some condition. I'm not against improvements to C++ safety, I just think making C++ a safe language has provably failed.
- zozbot234 4y agoReal-world RiiR efforts generally start with smallish, security-critical modules within larger code bases. It's not a full rewrite from scratch, you can replace C/C++ with Rust even at the level of a single function.
- carlmr 4y agoThat I'm completely on board with, you need to start somewhere.
- nine_k 4y agoNot rewriting, but starting anew. And usually you start (relatively) small. I see fewer and fewer reasons to start a new C++ project, except when the project makes heavy use of existing C++ code base anyway as large C++ libraries.
- simplotek 4y ago> Using C++ for a greenfield project today should require some very good justification though. Having to maintain legacy C++ applications is all the justification you need to have to understand that staring greenfield projects in C++ is quite frequently and by far the best option on the table It makes absolutely no sense at all to multiply the tech stacks that a team needs to work on, let alone master, just because naive platitudes have been said about any novel tech stack. You do not make any application better or more secure if you get clueless developers onboarding onto new technologies and forcing them to maintain N+1 code bases and 2*n bindings. This irrational dislike of C++ ignores the fact that adopting the latest C++ release and toggling static code analysis in your project, which nowadays comes for free, already gets any project way ahead of where naive retractors believe C++ is.
- 72deluxe 4y agoI would agree that clueless developers are the issue, not the language. I have happily recently started a new project in C++ and amazingly it works, even without the latest faddish languages or tech stacks!
- raggi 4y agoIt is not possible to staff a team with perfect humans. Better tools remove the need for perfect humans.
- jerome-jh 4y ago> toggling static code analysis in your project Except that security must be on by default, and it must be made hard (or shameful) to circumvent it. We all know any kind of protection is easy to bypass in C++. I remember an article from a Julia developer quitting over the culture of using unsafe code that had installed in the community. A mindset change is required by this profession. Too often (unverified) performance reasons have been used to justify risky code.