Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is 20 parameters too many?
Message
 
 
To
06/02/2017 14:31:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01647608
Message ID:
01647624
Views:
40
>>I seem to recall a recent thread of number of parameters being too many or not. I am refactoring a routine where a method (called from various parts of the program) will have up to 20 parameters. The reason for so many parameters is that this method is called from different routines. And the method need some but not all values passed (depending on calling routine). My question is, what is the real downside of having so many parameters (if any)?
>
>Many would say to isolate a class and/or a method to one major specific need. When it comes to alternate support, sometimes, a dedicated method for such need might be good to consider.

Thank you. I am considering this approach.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform