[swift-evolution] Enums and Source Compatibility

Rod Brown rodney.brown6 at icloud.com
Sun Sep 17 20:08:48 CDT 2017


> On 18 Sep 2017, at 9:46 am, Christopher Kornher <ckornher at me.com> wrote:
> 
> 
>> On Sep 17, 2017, at 5:04 PM, BJ Homer <bjhomer at gmail.com <mailto:bjhomer at gmail.com>> wrote:
>> 
>> Please note that, as proposed, enums are always treated as exhaustive *within the same module*. A new user writing MyFirstEnum is likely using it within the same module, and will thus get exhaustive behavior with no extra keywords required.
> 
> • What is your evaluation of the proposal?
> 	Uh, +1
> 
>  • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
> 	not enough
> 
> Apologies for wasting everyone’s time…

Haha no problems. Yes, it seems clear people are jumping to conclusions. This is a case specifically for framework developers purely for interface consistency, with is *exactly* when you want the default behaviour to protect you from external dependency changes.

Within the context of a single application at compile time, you will always know all cases already and therefore exhaustive can become the default. Cross frameworks, not so much.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170918/6bbdafc8/attachment.html>


More information about the swift-evolution mailing list