Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only