[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
Slava Pestov
spestov at apple.com
Tue Nov 28 22:57:02 CST 2017
Hi Chris,
> On Nov 28, 2017, at 8:54 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>
> “post.author" always invokes the DynamicMemberLookupProtocol proposal.
> “post.author()” would invoke the “DynamicCallableWithKeywordsToo” hook in the dynamic callable proposal:
> https://gist.github.com/lattner/a6257f425f55fe39fd6ac7a2354d693d <https://gist.github.com/lattner/a6257f425f55fe39fd6ac7a2354d693d>
Elsewhere in Swift, it is generally the case that
foo.bar()
is equivalent to
let fn = foo.bar
fn()
Would this equivalence still hold with your proposal(s)?
Slava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171128/4e6844cd/attachment.html>
More information about the swift-evolution
mailing list