Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The m. variable thing, the sequel
Message
From
14/01/2005 12:27:07
 
 
To
13/01/2005 08:45:48
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00969478
Message ID:
00977261
Views:
91
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform