SE-0195 — Introduce User-defined "Dynamic Member Lookup" Types

The Core Team met on Wednesday, January 31 to discuss the proposal and the feedback from the review. There's been a lot of great discussion, and the review thread unsurprisingly bifurcates on two important subtopics:

  1. Is this the right direction for Swift, and if so, is this the right general approach?

  2. Assuming the direction and approach is more-or-less correct, discussion about specific details (e.g., should the approach use a marker protocol).

After reviewing the discussion in this review thread and discussing this review within the Core Team, the Core Team has decided the answer to #1 is "yes". The proposal is accepted in principle, but specific details of the proposal need to be further discussed and ironed out. Specifically, there is the matter of using a marker protocol, which raises a bunch of technical questions.

On the general principle of the proposal, the Core Team felt that:

  • This proposal added valuable functionality to Swift
  • This proposal is not at odds at potentially adding any new dynamic affordances to Swift later that (say) tie into Swift's runtime metadata, etc.
  • There are tooling affordances, such as syntax coloring, that can be used to distinguish methods call going through this member lookup mechanism — without adding additional syntactic weight that would be at odds of some of the core goals of this proposal

@Chris_Lattner3 has a revised version of the proposal, which can be found here:

https://github.com/apple/swift-evolution/blob/master/proposals/0195-dynamic-member-lookup.md

The previous version of the proposal can be found here:

minor typo fixes. · apple/swift-evolution@59c7455 · GitHub

The review will extend for another week to discuss the revised details of the proposal.

Thank you to everyone who has participated in the review. The insights and feedback has been invaluable. The review will continue on this review thread.

11 Likes