Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is 20 parameters too many?
Message
From
07/02/2017 14:27:12
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01647608
Message ID:
01647670
Views:
103
Hi Dimitry,

I remember asking myself whether I should:
1) let the list of parameters of a central routine of a complex to grow massively,
2) re-organised the code with some sort of "state-object" (yep just a plain old custom object).

I was in a hurry and decided to stick to solution 1). I can certainly say that I was wrong. Passing a pretty large number of parameters ? Possibly that's the the time to incorporate at least ONE "state-object" resource to be passed as a single parameter possibly along with other parameters that may be kept as standalone atomic parameters. It both improves the reading and reduce the clutter.

all this IMVHO of course, Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform