Re: New Switch Idea
- Posted by jeremy (admin) Mar 28, 2009
- 1092 views
SDPringle said...
Why say with or without fallthru when you could say without or with break?
switch without break -- default C like switch current behavior switch with break -- BASIC select like behavior: automatically put breaks in before each case
Equivalent to the current idea except you don't introduce yet another keyword.
To me, with/without break is confusing. without break. Does that mean the switch statement does not automatically insert breaks for me? or does it mean that I can do the switch without breaks (i.e. me not inserting a break).
The term for the behavior we are toggling is fall thru. with fallthru and without fallthru is clear and there is no mistaking it.
Jeremy