[swift-evolution] [Pitch] Nested types in protocols (and nesting protocols in types)

Karl razielim at gmail.com
Mon Oct 17 13:35:12 CDT 2016


> On 17 Oct 2016, at 20:31, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> 
> That’s also on the line: [https://github.com/apple/swift/blob/611fc78d28a5da97dd1bea40761b913b1077aef5/docs/GenericsManifesto.md#nested-generics <https://github.com/apple/swift/blob/611fc78d28a5da97dd1bea40761b913b1077aef5/docs/GenericsManifesto.md#nested-generics>](https://github.com/apple/swift/blob/611fc78d28a5da97dd1bea40761b913b1077aef5/docs/GenericsManifesto.md#nested-generics <https://github.com/apple/swift/blob/611fc78d28a5da97dd1bea40761b913b1077aef5/docs/GenericsManifesto.md#nested-generics>)
> 
> -- 
> Adrian Zubarev
> Sent with Airmail
> 
> Am 17. Oktober 2016 um 20:26:47, T.J. Usiyan (griotspeak at gmail.com <mailto:griotspeak at gmail.com>) schrieb:
> 
>> I want this feature. Both class in protocol and protocol in class could clean up many relationships but I think that a blocking concern is "How does this interact with generics?" Nesting types in generic types is already disallowed and how different is this feature from that?
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

And even partially implemented, behind the flag “-enable-experimental-nested-generic-types”. I don’t know what’s missing from it, but it seemed to work in some simple cases last time I tried.

- Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161017/475a2f78/attachment.html>


More information about the swift-evolution mailing list