3 ms·
It works in C, and have caused countless bugs in C (and C++). So much so that many have adopted the rule that the variable goes on the right, "if 42 = b", to m
by magicalhippo 7y ago
It works in C, and have caused countless bugs in C (and C++).
So much so that many have adopted the rule that the variable goes on the right, "if 42 = b", to make sure the compiler barfs when you intended to write "if b == 42".
With := it's less likely that mistake is made. I also find it visually more distinct, so easier to parse, but that might be very subjective.