3 ms·
> From the backend, you'll need to check that all those ids are consistent and match. Or you don't check and just discard all the superfluous parameters, I've
by tasuki 4y ago
> From the backend, you'll need to check that all those ids are consistent and match.
Or you don't check and just discard all the superfluous parameters, I've seen that too unfortunately.
All your points are valid of course :)
- jraph 4y agoYup. 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.