Graham Samuel wrote:
On Sun, 19 Feb 2006 10:37:36 -0800 (PST), Judy Perry <[EMAIL PROTECTED]> wrote:
Mark,

Right, again, my argument was less "IF-THENs rule and CASE-SWITCHes suck"
than IF-THENs are easier to read/learn/are more transparent for
non/novice-programmers.

Just to add a tiny footnote to this: Judy, how would you tackle a situation where a user (or a handler) can put in say a number from 1 to 50, and each of those numbers requires the program to carry out a different action? It wouldn't really be feasible to have a depth of 50 if-then-elses
...

Teaching the whole of the art of programming in a single session or even a single semester would likely overwhelm the student and the teacher. If a given construct seems a bit daunting for the first semester or the first year, there's plenty of time to introduce it later.

Learnability and usability are different goals. If switch/case blocks seem a bit much for the learner, that takes nothing away from the graceful utility which has made them a cornerstone of so many languages.

Switch/case blocks may be best learned in the second semester anyway: if the first semesters goes well, by the end of it the learner may have already begun to find the limitations of if/then and is hungry for something else....

--
 Richard Gaskin
 Managing Editor, revJournal
 _______________________________________________________
 Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to