8 ms·
It's very common in C while((buf = resultofstreamingoperation() != null) { } The ` != null ` is redundant here but you can imagine where it'd be requ
by porridgeraisin 3y ago
It's very common in C
while((buf = resultofstreamingoperation() != null) {
}
The ` != null ` is redundant here but you can imagine where it'd be required.
- sweetjuly 3y agoA more common form (and slightly less evil) is for error checking: if ((error = do_a_thing())) { // some error happened, good thing we saved the error code } Given the standard "zero is success" paradigm, handling errors is very succinct.
- demondemidi 3y agoYou are arguing "common" == "good". That's not true.