2 ms·
Is it garbage logic? Dev: "The compiler's automatic error checking didn't catch the array overrun in my code, resulting in a costly security breach!" Compiler
by kazinator 7y ago
Is it garbage logic?
Dev: "The compiler's automatic error checking didn't catch the array overrun in my code, resulting in a costly security breach!"
Compiler Vendor: "Our data shows that compiler diagnostics, when used by a skilled and conscientious programmer who is prepared to review and test his or her code, reduce software defects compared to no diagnostics, making software development safer."
- babyloneleven 7y agoYour examples are garbage logic because array overruns are so harmful that they should be hard errors. Of course, this requires a runtime cost, that can be elided in most cases by the compiler's optimizer. But even low level languages nowadays can be safe by default (see Rust) - the unsafe behavior should always be a conscious, well studied decision by the developer.
- abalone 7y agoYou’re comparing getting decapitated by a truck to an array overrun, which might be a sign your analogy is strained.