On Dec 10, 2017, at 10:04 AM, Paul Cantrell <[email protected]> wrote:
>> This is looking less like a protocol by the day. The square-peg grooves in 
>> the round hole are getting deeper and more splintery with every revision.
> 
> The flavor of DynamicMemberLookupProtocol with an explicit member requirement 
> sure does _read_ nicely! The fact that Chris left it present but commented 
> out in the proposal suggests that expressing it that way has some intuitive / 
> communicative value.
> 
> This section laying out the reasons why it doesn’t work:
> 
>     
> https://gist.github.com/lattner/b016e1cf86c43732c8d82f90e5ae5438#declare-an-explicit-subscript-requirement
>  
> <https://gist.github.com/lattner/b016e1cf86c43732c8d82f90e5ae5438#declare-an-explicit-subscript-requirement>
> 
> …reads like a todo list for rounding out protocols and generics.
> 
> So, Chris, question: in the future, maybe circa Swift 6 or 7, is it likely 
> that generalized existentials + some sort of more robust handling of 
> “mutating” in protocols would make the explicit member requirement on 
> DynamicMemberLookupProtocol actually work?

It is possible.   I’m not the best expert on the generics system, but I can’t 
imagine that it would be a priority in the near term.

-Chris


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

Reply via email to