Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
SNIP
>
>Also in this case, performance is not the factor that determines the place of a CASE statement in a DO CASE. The performance differences is in most cases negligible. Personally I use the order of the CASE to rule out certain conditions. I take advantage of the CASE ordering. While not regarded as best practise by many, its a practise I'm very comfortable with.
I just **had** to make a comment here, Walter...
While you yourself are very comfortable with that practise, you seem to neglect the fact that others who might read such code do not even expect such a usage and so might be led quite astray by such coding.
I dare say, for instance, that most VFP developers do not expect a CASE construct to be written such that every (or most) CASEs WILL *each* perform an important part of a task. Most readers, I contend, expect a single CASE to come into play in a DO CASE block.
So while you are very "comfortable" you seem to be making no allowance for who will read the code next. To me this is the single most important part of programming that has known production/maintenance requirements.
>
>I want to take the opportunity to point out, that seeking performance improvements in this kind of issues is useless. Most of the time the performance issue is related to database access or the algorithm or design of the system. Focusing on these kind of things to improve performance is non productive IMO.
I agree fully. However, there is a difference between "focusing" and just plain coding practises that help to maintain high performance.
cheers
>
>>Just my $0.02
>
>My € 0.02
>
>Walter,
Précédent
Suivant
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