3 ms·
> Of course that doesn't guarantee that that's what that parameter is actually named I’ve found the odds of that happening approach certainty once you have mor
by acdha 8y ago
> Of course that doesn't guarantee that that's what that parameter is actually named
I’ve found the odds of that happening approach certainty once you have more than one or two parameters. If you’re using a language without named arguments I usually treat adding a third parameter as a cue to reconsider using a more idiomatic interface, whether that’s something like classic Java OOP (.setTemporary(true)) or limiting that knowledge to one place by e.g. creating a subclass, struct, or a specialized function so you call createTemporaryFile() and know that ordering check only needs to be done in one place rather than by every caller.