Data-scientist who loves to use #datascienceforgood, especially in ecology, energy and the environment. Bonsai, gardening, bikes and music when I'm not at a keyboard.
It seems that maybe if those functions with large numbers of arguments exist, it's because of 2 things:
1) the function is going to be called a lot, and should be simple. A single call, not a chain of five calls that are mostly the same.
2) tweaking the operation of the function is complicated, but the defaults are mostly sane. If there is a large amount of ways to customise the function, but practically only a few of them will be needed to be tweaked in a single call, then it seems to make sense.
Sorry for long delay in responding, i guess dev.to doesn't do email notifications? Makes sense. Curious, do you try to keep your number of parameters small or do you not really think about it?
Data-scientist who loves to use #datascienceforgood, especially in ecology, energy and the environment. Bonsai, gardening, bikes and music when I'm not at a keyboard.
No sweat. I tend to be able to keep the parameters small as a by product of consistent refactoring. I also have the happy by product of being able to work on very small focused projects. Nothing I write tends to have more than tens of programmers use it or multiple use cases :)
Data-scientist who loves to use #datascienceforgood, especially in ecology, energy and the environment. Bonsai, gardening, bikes and music when I'm not at a keyboard.
It seems that maybe if those functions with large numbers of arguments exist, it's because of 2 things:
1) the function is going to be called a lot, and should be simple. A single call, not a chain of five calls that are mostly the same.
2) tweaking the operation of the function is complicated, but the defaults are mostly sane. If there is a large amount of ways to customise the function, but practically only a few of them will be needed to be tweaked in a single call, then it seems to make sense.
Sorry for long delay in responding, i guess dev.to doesn't do email notifications? Makes sense. Curious, do you try to keep your number of parameters small or do you not really think about it?
No sweat. I tend to be able to keep the parameters small as a by product of consistent refactoring. I also have the happy by product of being able to work on very small focused projects. Nothing I write tends to have more than tens of programmers use it or multiple use cases :)
Right, and I imagine you can change the function interfaces more easily if there's a small set of users
Absolutely.