Modern C++ Won't Save Us (2019)
My comment for too many years is that C&#x2F;C++ fails to deal with three issues: &quot;How big is it&quot;, &quot;Who owns it&quot;, and &quot;Who locks it&quot;. C++ has, with difficulty, made progress on &quot;How big is it&quot; through templates, but raw pointers keep leaking out. &quot;Who owns it&quot; has been tough to deal with, although &quot;owned pointers&quot; at least try. &quot;Who locks it&quot; has yet to be addressed at the language level, although at least there&#x27;s now some agreement on multiprocessor semantics at the language level. The old line was that locking is an operating system problem.<p>After years of C++ and six months of Rust, I don&#x27;t think C++ can catch up with modern languages with template gimmicks. Getting pointers right needs global analysis. Getting decent error messages about inconsistencies between point A here and point B way over there requires global analysis. Trying to build a borrow checker with the C++ template and type system is pounding a screw.<p>Rust has its own problems. Figuring out how to do something safely can be quite difficult. It can involve solving puzzles, and often involves rewriting things at several levels, especially when threads are involved. As a result, &quot;unsafe&quot; is too often used as an escape hatch when someone can&#x27;t spend the time to get it right. Those who slave under the whips of &quot;agile&quot; may be forced to such hacks.