The simple addition of foo makes the second form entirely reasonable.
Without knowing the history of the code it's hard to say why it's ended up at the form it currently has. It's way too easy to look at things in isolation and find fault with them, or draw conclusions about what is clean/bad.
What about:
The simple addition of
foo
makes the second form entirely reasonable.Without knowing the history of the code it's hard to say why it's ended up at the form it currently has. It's way too easy to look at things in isolation and find fault with them, or draw conclusions about what is clean/bad.
Please extract the middle part as a separate function and resubmit your pull request ;-p :-).