6 ms·
"You seriously consider malice to be a reason why the compiler rejects your program" Of course it's malice.
by pookiesbutt 15y ago
"You seriously consider malice to be a reason why the compiler rejects your program"
Of course it's malice.
- Tractiable 15y agoI agree, most of these are hilarious! But seriously, until programmers are paid $100/hour or given royalties, deal with the result of bad programmers... ... or do it yourself!
- VladRussian 15y agothe compiler in many simple cases could have tried to repair the program, like attempting to insert(remove) missing(extra) ';' or '}' for example. While it may be not a malice, it is definitely an absence of a good will. Note: i did work on a real product which had parser inside that had such style of repair implemented, and such approach is also quickly mentioned in the dragon book as well
- gridspy 15y agoIt's possible that such automatic repair would create a bug. Much safer to have a human check and ensure that the ; goes in the right place. A better point is that the error messages from many compilers can be very obscure. This was particularly true 10-15 years ago.
- philwelch 15y agoYeah, if a compiler only compiles the code you actually wrote, it's still your fault. If a compiler tries to infer what you meant and compiles that instead, then it might genuinely be the compiler's fault when something breaks. Plus, the original code should still be fixed instead of relying on the compiler to compile the same broken code the same "right" way each time. We spent the last 20 years trying to convince web developers of that idea. Clang does something like this. If it notices a simple enough syntax error that it can correct, it still generates the error message but it makes the correction internally and continues the compilation far enough to generate useful error messages about the rest of the code. But it doesn't output anything or change the code.
- Natsu 15y agoSomeone has never dealt with incompetently written scripting languages or tragically wrong documentation for the same. Sufficiently advanced incompetence is indistinguishable from malice. I remember having to test exactly how a bunch of different predicates actually worked, when the documentation thereof was a complete lie and the predicates just evaluated to false instead of creating an error when fed data they supposedly accepted (but actually couldn't).
- deleted 15y ago[deleted]