[swift-evolution] [Pitch] Introducing `Unwrappable` protocol

Guillaume Lessard glessard at tffenterprises.com
Tue Mar 7 19:33:23 CST 2017

> On Mar 7, 2017, at 4:30 PM, Erica Sadun <erica at ericasadun.com> wrote:
> I deliberately moved it out of proposal format for that reason, so it could be discussed first.

I see now.

>> - The `case let .some(foo)` vs. `case .some(let foo)` issue could be a targeted proposal.
>> (I really like this)
> I put it in as a bug report (link in repo) based on ?Anton's? suggestion but Jordan says this 
> isn't similar to normal warnings they emit.
>> - The Unwrappable protocol (and keyword) is interesting; it can probably be its own discussion.
>> (feels unnecessary, without feeling wrong)
> Unwrappable is driven from Chris L to simplify language implementation and support
> the eventual introduction of Result/Either. If that's not needed anymore, I'm sure 
> he or others will let me know and I'll cross out. I love the idea of an easy way
> to use existing syntax sugar for custom types.

I like it too, but I’m not sure how useful it would really be.

Thanks for the clarification!

More information about the swift-evolution mailing list