[swift-evolution] Proposal: Remove the "fallthrough" keyword

Steve Canon scanon at apple.com
Sun Dec 6 11:16:27 CST 2015


> On Dec 6, 2015, at 4:52 AM, Jacopo Andrea Giola <swift-evolution at jacopo.giola.org>
> 
> If this proposal is accepted, it must be coupled with a compiler check that the reswitch statements don't introduce an infinite "switch" loop.

Detecting this in general is solving the halting problem, so such a check isn't actually feasible.  One could warn when termination can't be proved, but making it a hard error would remove much of the usefulness for implementing interpreters.

- Steve


More information about the swift-evolution mailing list