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

Chris Lattner clattner at apple.com
Sat Dec 5 11:02:45 CST 2015


On Dec 4, 2015, at 2:05 PM, jalkut at red-sweater.com wrote:
> In the spirit of some other proposals that remove C or C++ style artifacts, what do folks think about the possibility of removing the "fallthrough" keyword from the language?

I’m not making an argument either way, but I want to point something out: there is a major difference between fallthrough vs ++/c-style-for.  To someone who doesn’t know them, the later are "syntactic magic” with no reasonable way to decipher other than looking them up somewhere.  The former is an English word whose meaning is obvious in context.

All I’m saying is that to a reader of code, the “badness” of ++ and c-style for loops is greater than the “badness" of fallthrough.

-Chris


More information about the swift-evolution mailing list