3 ms·
"Treat warnings as errors" is a standard best practice.
by Jare 4y ago
"Treat warnings as errors" is a standard best practice.
- Gibbon1 4y agoTreat warnings as errors is terrible practice.
- still_grokking 4y agoIt's the only sane thing to do. And everybody who doesn't do so really deserves the pain that results later on.
- rightbyte 4y agoWhat is the point of having warnings then.
- still_grokking 4y agoYou can suppress them in the rare cases this is needed. Such suppression are than big warning signs in the code telling you that something exceptional is going on which needs extra attention when touched. Also warnings may be wrong. Errors mustn't be and can't be as strict as warnings therefore. But it shouldn't be possible to "just ignore them". If you do, this needs to be done deliberately and explicitly.
- Gibbon1 4y agoYeah at best you can force can force people unfamiliar with the code to waste their time suppressing a dumb ass warning that means nothing. Or worse accidentally introduce a bug.
- Gibbon1 4y agoNo it's completely insane because you never know what a different or future compiler is going to decide to bitch about.
- still_grokking 4y agoA different or future compiler is going to "bitch" about more bugs in your code. But I see, you're not interested in correcting the bugs you produce. You obviously prefer the "three-monkeys solution" to correctness problems.
- deleted 4y ago[deleted]
- CoastalCoder 4y ago> "Treat warnings as errors" is a standard best practice. It's a good general practice, as long as exceptions can be made. Some compiler warnings are rooted in the compiler being unable to prove something that is actually true.