We broke backwards compatibility with the previous client by not returning metric objects when calling StatsD metric methods anymore. However, in some cases code depends on the return value of these methods to evaluate to true, because they are used as last statement in a block, which end sup being evaluated as an expression in if statements. It is basically impossible to detect people depending on this return value being evaluated to true.
So rather than returning nil, I propose we return a useless object that evaluates to true so not introduce accidental bugs by migrating to the new version.
We broke backwards compatibility with the previous client by not returning metric objects when calling StatsD metric methods anymore. However, in some cases code depends on the return value of these methods to evaluate to true, because they are used as last statement in a block, which end sup being evaluated as an expression in
if
statements. It is basically impossible to detect people depending on this return value being evaluated to true.So rather than returning
nil
, I propose we return a useless object that evaluates to true so not introduce accidental bugs by migrating to the new version.