[swift-evolution] [Pitch] Introduce user-defined dynamically "callable" types
sabre at nondot.org
Tue Nov 14 00:27:31 CST 2017
> On Nov 13, 2017, at 1:45 AM, Adrian Zubarev <adrian.zubarev at devandartist.com> wrote:
> Hello Chris, I have some questions about this passage:
> Before this proposal, the Swift language has two types that participate in call syntax: functions and metatypes (for initialization). Neither of those may conform to protocols at the moment, so this introduces no possible ambiguity into the language.
> Can you shortly describe why it would be ambiguous if metatypes would conform to protocols?
It would only be ambiguous if a metatype conformed to the DynamicCallable protocol specifically. This can’t happen today, and if it happened, we could easily define disambiguation rules.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution