3 ms·
But if you had to refactor the above function, you wouldn't have to reverse-engineer some argument parsing. You'd know how it must be called anywhere in the pro
by ben509 8y ago
But if you had to refactor the above function, you wouldn't have to reverse-engineer some argument parsing. You'd know how it must be called anywhere in the project, just by looking.
And generally, I think the disincentive rationale is self-defeating:
* the premise behind disincentive is you're dealing with someone who is (at least in the moment) careless
* now they're going to have to write more code to do a thing they've set out to do
* but we've already selected for an individual who is writing carelessly
In this case, it can only work if extra argument checks are the last straw that causes this individual to say "enough" and refactor that function. For what my experience is worth, I think this is unlikely.