Austin do we really need this 3rd proposal? This makes my original one really a 
waste of time. I was trying to solve https://openradar.appspot.com/20990743 
with the original `Any<>` proposal when Swift 3 ships. Your other proposal 
would enhance it without introducing breaking changes.

To that end, I’d suggest Any<>,Any<Any, XX>, and Any<Any<XX>> all cause 
warnings.
Why would these cause warnings?

func foo(any: protocol<>)

func foo(any: protocol<Any>)

func foo(any: protocol<Any, ProtocolA>)

func foo(any: protocol<ProtocolA>)

Everything is already fine today.


-- 
Adrian Zubarev
Sent with Airmail

Am 19. Mai 2016 bei 08:55:54, David Waite via swift-evolution 
([email protected]) schrieb:

My feedback is that we should narrow what is acceptable for Any as much as 
possible, because relaxing restrictions in the future won’t break existing code.

To that end, I’d suggest Any<>,Any<Any, XX>, and Any<Any<XX>> all cause 
warnings.

-DW

> On May 19, 2016, at 12:43 AM, Austin Zheng <[email protected]> wrote:
>  
> Does anyone want to speak up in favor of 'Any<>'? The more I think about it 
> the more I think 'Any' should just be the single, canonical form.
>  
> Austin
>  
>  
>> On May 18, 2016, at 11:33 PM, Colin Barrett <[email protected]> 
>> wrote:
>>  
>> There's no need for this, that's what I was trying to get across. It's 
>> (likely) a special case in the grammar right now. If we eliminate Any<>, 
>> from the point of view of syntax, both Any and Any<Foo, Bar> are just a 
>> built in type and normal application of generic arguments (to a built in 
>> type).
>>  
>> -Colin (via thumbs)
>>  
>>> On May 19, 2016, at 1:58 AM, Austin Zheng <[email protected]> wrote:
>>>  
>>> - 'Any<>' should be allowed. You can currently use 'protocol<>' in your 
>>> code instead of 'Any'.
>  

_______________________________________________
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