[swift-evolution] Enhanced existential types proposal discussion
austinzheng at gmail.com
Fri May 27 03:55:57 CDT 2016
> On May 26, 2016, at 12:03 PM, Matthew Johnson <matthew at anandabits.com> wrote:
> Austin, this brings to mind the question of how you will handle conflicts if the type defines an instance member with the same name as the asociatedtype. This should be uncommon due to capitalization conventions but is still a possibility.
This is a really good point. I'm tempted at this point to punt on this potential issue, the same way we don't handle two protocols with associated types that have the same name :).
This problem should be mentioned, but like you said code that conforms to conventional Swift style shouldn't run into this problem. For example, I wouldn't expect Apple frameworks to be able to cause this issue in user code, since they are pretty scrupulous about naming. It may simply be easiest to ask users to rename their members if it becomes a problem. (Any alternate suggestions are, as always, welcome too.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution