[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types

Joe DeCapo snoogansbc at gmail.com
Thu Dec 7 11:47:03 CST 2017


> On Dec 7, 2017, at 11:29 AM, Letanyan Arumugam <letanyan.a at gmail.com> wrote:
> 
> I think a better approach would still be to try and get the author of the type to make the right choice in the first place.

After rereading the post you linked to last night (https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20171204/042015.html <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20171204/042015.html>), I think it could quickly get out of hand. It might be simple enough for DynamicMemberLookup, but once we get to the point of discussing DynamicCallable there are many more variations.

- Calls that return Void
- Calls that return an optional
- Calls that return an IUO
- Calls that throw
- etc.

I know this is a discussion about DynamicMemberLookup, but DynamicCallable is closely related and I imagine will end up following a similar pattern. How would you propose that DynamicCallable would be annotated in this fashion? There are a number of types of calls, and some are orthogonal so the combinations quickly add up. People will probably have similar concerns about failed call lookups as they do about member lookups.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171207/1ef3e7ea/attachment.html>


More information about the swift-evolution mailing list