3 ms·
Yup. Actually though about that possibility while writing this. Quite like I would not use a function argument if I don't need it. So I would avoid putting the
by jraph 4y ago
Yup. Actually though about that possibility while writing this.
Quite like I would not use a function argument if I don't need it. So I would avoid putting these parameters in the function signature in the first place. It just leads to confusion at best, and there's a good reason why many compilers emit warnings for this.
I believe a function should only take the minimum it needs, and I believe APIs should not be different in this matter.
Redundancy is good when you actually need it, and not quite when you don't.