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

Ray Fix rayfix at gmail.com
Fri Dec 4 16:25:33 CST 2015


> On Dec 4, 2015, at 2:20 PM, Ray Fix <rayfix at gmail.com> wrote:
> 
> 
>> On Dec 4, 2015, at 2:16 PM, Greg Titus <greg at omnigroup.com <mailto:greg at omnigroup.com>> wrote:
>> 
>> Streza’s source code is an example of Duff’s Device, which is a big place where switch fallthrough is arguably the cleanest way to do things and the reason why I’d personally prefer to keep it as part of the language.
> 
> Yes.  You beat me to it but I agree.  I think having fallthrough could be an important performance optimization as refactoring would either result in the overhead of a function call or replicated code.   I would also prefer to keep it in the toolbox.
> 

I should have mentioned that 99% of the time the overhead of a function call doesn’t matter, but when it does… it is great to have.

Ray Fix


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151204/8a4fcf9f/attachment-0001.html>


More information about the swift-evolution mailing list