Re:Baidu File System – A distributed file system for real-ti...
by GoToRO on Tuesday October 25, 2016 @08:21AM
(#12787244)
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...
[ Parent
| on HN ]
Re:Baidu File System – A distributed file system for real-ti...
by knorker on Tuesday October 25, 2016 @12:24PM
(#12789239)
The 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.