Pack in, pack out. :)
Electromagnetism and solid-state physics are more fundamental still.
Better to be ashamed than ripped to pieces though.
Do these truly exist? I'm doubting it more and more for every day, with more and more trash being found around campsites used by the most rugged of outdoorsmen.
See the Linux kernel which for all its warts is arguably the greatest software engineering achievement, and is by any measure one of the most widely deployed software programs.
...buuut... they also leave trash around their campsites...
I'm not saying I could do it better. I fully understand the business decisions and they are doing the very best they can. I'm consciously ignoring the big picture and pointing to this one flaw, which isn't even their fault. It's C's fault!
C++ improves on C in some respects, but still suffers from undefined behaviours like use-after-free/dangling references, dereferencing of null (e.g. a moved-from unique_ptr) and iterator invalidation, none of which are caused by a Turing complete type system (they all, in various forms, exist in C too).
FWIW I don't consider unique_ptr a smart pointer, that's just RAII in action.
Sure, it's technically optional in Rust too, but in Rust, you have to wrap raw pointer dereferences and stuff into unsafe{} blocks. The default is safety. In C++, your whole program is an unsafe block.
balance the comfort of accumulated knowledge with your animal instincts
Looking at the latest security issues, with JavaScript hackers found a faster way to break in: examples, like crypto mining in JS delivered to websites and so on
If by "delivered to websites" you mean without the site owner's consent, via ad networks or comments/whatever user generated content, then it's a problem of trust and/or content filtering, it's orthogonal to browser sandboxing.
Not at all, the owner of a website should not be able to coerce your browser to anything but display the page.
So-called modern languages are more like junk food and daytime TV.
But I agree those tools are limited. The class of bugs which C++ protects you from are the shallow ones. Coding with discipline will prevent more bugs than switching to C++.
Languages with real memory safety however are a genunie step up. Rust for example makes it painful to not code with discipline. Unfortunately I find it makes programing painful in general -- so I am still waiting for a safe language that is as much fun as C.
I'd say your primary enemy are those using your codebase, who can and may exploit any hole. And ofc, its not just your codebase, as it sits on top of libraries, maybe a runtime, an OS, and hardware; you're not safe just because your onw program is fine, within the context of its internal machinations