News for hackers. Stuff that matters.
Re:Modern C++ Won't Save Us by gmueckl on Tuesday April 23, 2019 @07:47AM (#19727627)
I have seen it done in practice, on rather large systems. But it requires actual, slow software engineering instead of the freestyle coding processes that are used in most places.
Re:Modern C++ Won't Save Us by paulmooreparks on Tuesday April 23, 2019 @10:48PM (#19735135)
My main rule is "no naked new," meaning that the only place the new operator is allowed is in a constructor, and the only place delete is allowed is in a destructor (unless there's some very special circumstance). This style lends itself to RAII. The other rule is to use the standard library containers unless there's a very good reason not to do so. That seems to cover most of the really basic errors.