A case against default values for function arguments
Written by Grigory Rechistov in Uncategorized on 17.12.2025. Tags: api, clean code, design,
There is a good rule of designing functions (and class methods, which are a variant of functions): a function should do one thing only, and do it well.
A corollary of it is another tactical design rule: a function should have as few arguments as possible. Three is the absolute …