Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is 20 parameters too many?
Message
From
06/02/2017 14:31:13
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01647608
Message ID:
01647616
Views:
79
>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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform