Forbidding redundant use of protocol<...>/Any<...> would be a great follow-up 
proposal. Mercifully, there are few interdependencies between the two proposals 
- you could conceivably propose it even if if Any<...> were rejected, and just 
have it apply to protocol<...>.

Austin

> On May 19, 2016, at 12:50 AM, David Waite via swift-evolution 
> <[email protected]> wrote:
> 
> They can all be interpreted, but:
> - they provide multiple ways of expressing the same concept
> - the additional uses of Any detract from code clarity
> - it is possible (in the absence of an established design) that these 
> syntaxes (particularly Any<Any<ProtocolA>>) might limit our ability to add 
> existential types without either breaking existing code or adding special 
> cases in the parser. I can go into more detail on my reasoning here, but that 
> seems a diversion of this topic to do so.
> 
> An example elsewhere in the language of otherwise valid code being rejected 
> because the syntax is redundant:
> 
> enum MyError:ErrorType, ErrorType {}
> 
> I’m also specifically saying that the *syntax* should warn on the use of 
> Any-within-Any. Code such as:
> 
> typealias Foo = Any
> typealias Bar = Any<Foo, Sequence>
> 
> would be fine.
> 
> -DW
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to