Re: New switch/case idea
- Posted by Fernando Apr 01, 2009
- 1834 views
jeremy said...
Instead of making a 50 case switch that has case continue ... then 50 times, we could do a switch X with fallthru do.
Yes, but, sorry, except for the elegance, IMHO, that's not very relevant because:
- Currently, most editors have cut&paste and/or macros to do that very fast;
- The increase in file length is insignificant;
- Euphoria is a verbose language (ex.: 'end function', 'end procedure', ...).
IMHO, a case modifier, like continue, facilitates program reading, since the probability to have a complete case statement in one screen is greater than to have a complete switch statement in one screen.
Thanks for your comments,
Fernando