Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is 20 parameters too many?
Message
 
 
À
07/02/2017 15:07:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01647608
Message ID:
01647677
Vues:
51
>>>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
>>
>>Thank you for your input, Daniel.
>
>I agree with Daniel. I create the object use a Empty type class and add the properties using AddProperty().

Thank you for your input.
"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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform