4 ms·
My heuristic: If you have 5 or more arguments, you should use a config object.
by murph-almighty 5y ago
My heuristic: If you have 5 or more arguments, you should use a config object.
- Timwi 5y agoMy heuristic is to not be dogmatic like that. A constructor for a triangle class may reasonably want to take 6 arguments (3 x- and 3 y-coordinates). In other cases, even four arguments might be better as a config object if those 4 are all very rarely used.