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

Proposal Accepted

On February 8, 2018 the Core Team decided to accept this proposal, given the form in its second version where an attribute is used to designate types that participate in the sugared dot-syntax described in this proposal.

After reviewing the feedback from the community, the Core Team felt the spelling of the attribute should remain as proposed — @dynamicMemberLookup. The alternative of @dynamic(...) was also considered, but the Core Team felt that spelling to be too close to the dynamic keyword and a potential source of confusion. This concern was brought up in the review thread as well.

The rationale for the marker being an attribute instead of a protocol (as in the original proposal) was well-articulated by @Chris_Lattner3 in the review thread in that the marker protocol would not provide the expected affordances of a normal protocol:

Thank you to everyone who participated in discussing this language change, both during the pitch phase and the formal review!

10 Likes