3 ms·
Sometimes there is a 'true', sometimes there isn't. Sometimes the code is new, sometimes it is legacy code. You are making too many assumptions. When I see this
by GoToRO 10y ago
Sometimes there is a 'true', sometimes there isn't. Sometimes the code is new, sometimes it is legacy code. You are making too many assumptions. When I see this I know that...
- knorker 10y agoThe point of defining true to (1==1) is that it's "future proof" in case implicit typecasting to bool works in a world where 0 evaluates to "true". That would break approximately ALL C code. You're being ridiculous. You might as well try to protect against the meaning of "if" changing. I've seen amateur code that tries to protect against "stdio.h" going away and therefore reimplementing everything in it. This is like that. Believing that the meaning of everything can change means that you cannot use anything you didn't code yourself. You can't trust documented APIs, then that's some sort of programmer NIH nihilist.