Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The m. variable thing, the sequel
Message
De
14/01/2005 12:27:07
 
 
À
13/01/2005 08:45:48
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
00969478
Message ID:
00977261
Vues:
99
>Hi Andy,
>
>>Another programmer introduced me to using DO CASEs like your sample below.
>>To me, this code is much more readable than nested IF statements.
>>Jim does not like this style.
>
SNIP
You've got my stand right, Andy.

I'd only point out that you were recently introduced to the coding technique AND that *you* find it eminently more 'readable' that a nested IF.

I'd say that makes exactly my points:

1) It was UNnatural to you, as I contend it will be for 95%+ of programmers;

2) It is 'easier' to read than nested IFs. I say it's only "easier" if you are aware of what's going on. The problem for the rest of us is that it's still "easy" but we would be reading it incorrectly, not anticipatng that the entire construct is designed to do a whole job, CASE by CASE, never to actually execute the code under any CASE. That's just plain counter-intuitive to 95%+ of programmers.

Satisfying your distaste of nested IFs is legitimate if you are to be the only one to read/revise the code. Else, in my opinion, it is a wrong thing to do.

cheers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform