by JohnFen · 2y ago · 0 comments
That's absolutely not the C/C++ philosophy. The C philosophy (I lost track of whatever the C++ philosophy is supposed to be several versions back) is that it's a mid-level language and lets you have pretty low-level access to the machine. With that comes the need for great caution, much like working in assembly.
It's not premised on the idea that programmers are infallible at all, but on the idea that code-checking and correctness is to be done through process rather than the language itself.
while it is not explicitly written out like this anymore, the standard charter used to say
> Trust the programmer.
> Don't prevent the programmer from doing what needs to be done.
for 30 something years, which sounds similar to what the other poster said.
The current charter[1] only says "Allow programming freedom" which I'd still interpret to mean something similar.
1: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3280.htm
(edited due to formatting messups)