I agree 100%. I can definitely switch over to using a flag. However the other issue you raised is important: we're effectively depending on asymmetric implementations of distance() to order the two arguments in a certain way, without specifying those semantics anywhere.