Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Codage, syntaxe et commandes
The problem begins if you have to change values of one or more variables. You then have to take them out of the store statement and put them either in seperate lines
or in another STORE statement. With all the consequences of making mistakes and ending up with a mixture of styles (STORE and direct assignment).
I cannot see that as good practice, nor do I see this in any way improving readability.
You can group assignments together without store by simply leave an empty line in between the assignments.
Walter,
>Not in my POV. Esp. when working on code in use with many local (or even private) declaration my practice is to group the variables according to their datatype (and hungarian notation) into specific lines or line groups and initialize those lines or line groups with 1 statement each. That way often "forgotten" var inits are retrofitted.
>
>Of course old style functions with 50+ variables most of the time are better broken up into smaller functions each sporting only a handful of variables.
>
>>Its very bad advice to use STORE of many variables over the individual initialization of variables.
>>Individual initialization allows for better readability, especially when values might change over time.
>>
>>True it has some performance advantage, but it is so tiny that has no practical use except in the utmost extreme cases.
>>
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement