News for hackers. Stuff that matters.
Re:Gpsd bug may create a 1024 week time warp on October 23 by groby_b on Tuesday August 03, 2021 @01:30AM (#28045968)
Comes from the null==val idiom, and that comes from avoiding the popular "if (val=null)" bug in C/C++.

Sure, we could just admit that assignments in conditions are a permanently stupid idea. Instead, an entire industry backwards the conditions wrote.

Re:Gpsd bug may create a 1024 week time warp on October 23 by account42 on Tuesday August 03, 2021 @07:24AM (#28047920)
I find initializing condtions like `if(Type variable = ...)` to be very nice in C++ to avoid excessive nesting while still keeping the variable scoped to the block. Of course, I also enable -Wparentheses for things like `if(val=null)`, which you get e.g. when using -Wall with both GCC and Clang.