Main menu puzzle, Klaus

Judy Perry jperryl at ecs.fullerton.edu
Sun Feb 19 00:19:32 EST 2006


Thomas,

Well, as a "gal" as opposed to a "guy", I'll submit the following:

In everyday/non-programming life, we just don't think in terms of case
statements; we think in terms of if-thens:

case paycheckArrivesInMail
  payRent
switch
case paycheckNotInMail
  waitToBeEvicted
switch
...

I dunno... maybe y'all do... but I think thus:

IF I get paid THEN
  I can pay the rent
ELSE I risk getting an eviction notice

If-Then is just another way to express cause and effect, one of the
earliest things we learn as humans (also known as the permanency effect:
that irritating thing babies do when repeatedly dropping things from their
view, only to be delighted when you, as predicted, return the items to
them).

Case statements may well be more elegant, take fewer
lines/characters/whatever... but it's machine-speak, not human-speak.  If
I wanted machine-speak, I'd learn to program in octyl...

Judy

On Sat, 18 Feb 2006, Thomas McGrath III wrote:

> Hey guys,
>
> I don't understand why you guys don't like switch case statements?
> Really. I am trying to remember the first time I saw and used them
> back in Supercard. I remember thinking they were more difficult to
> write but once I did they seemed to do a lot more than if then's or
> at least with fewer words.
> I am curious to maybe what I saw that others didn't or what others
> see (and don't like) that I didn't see.





More information about the use-livecode mailing list