Lannie Rose
Jan 25, 2023

--

Sure but when I wrote the function, there were only two params. Then I added another (so I could be DRY and reuse the function) and then another and then another... I think I should follow a rule like, "Always use an object to pass params if there are, or are likely to be, more than two params." And have the discipline to do the conversion if a one- or two-param function becomes a three-param function. It will be easier to catch it then, rather than wait until it becomes an eight-param function.

--

--

Lannie Rose
Lannie Rose

Written by Lannie Rose

Nice to have a place where my writing can be ignored by millions

No responses yet