Re: New switch/case idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
DanM said...
jeremy said...

Since we are still talking about it (although I have no problems what-so-ever of switch X do), another option is choose X from

-D

Jeremy

FWIW, I very much prefer your suggestion of choose over switch, although I don't exactly see how the meaning of the word "choose" differs much from "select", which I also strongly prefered over "switch" for the sake of more easily understanding what the statement means, for those like myself who are or have been unfamiliar with the term "switch" as a programming statement.

And I also like the use of "from" in the statement, because it also helps make the usage/meaning clearer.

Dan

So, what about Jeremy's idea to use:

choose X from 
  case a then 
  case b then 
  case c then 
end choose 
instead of the word "switch"? I don't know how that translates into Russian (or Greek, or Urdu), but it looks to me to be easier for anyone not familiar with the "switch" statement to almost intuitively understand, unlike "switch".

I'd presume it could still use the same default no fall through, with options to either specify complete fall through or partial fall through as has been decided for "switch"?

Dan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu