It's somewhat funny seeing you guys all avoiding the word "goto"...
Hey, it's just a unconditional branch!
Now seriously, in a past incarnation I used C in very resource-limited
contexts (both in execution time and code size) and goto-ing around
inside a switch statement was often the only solution.
Not that porting Swift to a Raspberry Zero should be a short-term goal,
but if the current "fallthrough" stays in whatever incarnation, I'd be
Typing this in reminded me of a possible way to allow common code to be
executed at the end of some cases, but not others: before the switch,
set up a closure (or an array or dict of closures, whatever) and call
that as the case's last statement; no doubt you-all would have
suggestions about properly scoping such a thing.
On 12/5/15 22:02, email@example.com wrote:
Very much thinking out loud and not really the implications, I wonder if we might just use "continue" instead of "reswitch".
I very much like specifying what case to fall through into, no matter how we spell it.