[swift-evolution] [Pitch #2] Introduce User-defined "Dynamic Member Lookup" Types

Chris Lattner clattner at nondot.org
Tue Nov 28 22:37:36 CST 2017


> On Nov 27, 2017, at 7:31 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> 
> Better yet, since we previously started to require “@objc dynamic” instead of “dynamic” with the notion that perhaps there would be some future non-ObjC dynamism, we *could* have it spelt “dynamic member(_:)”.

I’m super open the changing the spelling of anything in the proposal.  That said, if you really mean to suggest that we introduce some new syntactic form, I’d be wary of that.  It increases the scope of the proposal and makes the cost/benefit tradeoff harder to justify.  One of the things that I think is compelling about this is that the cost of it is very low (it really does fit naturally into the existing architecture of the compiler), which means that the narrow benefit is justifiable (IMO).

> But this is all just spelling now; I think the overall design is compelling in its elegance and power.

I’m glad to hear that, thanks!

-Chris



More information about the swift-evolution mailing list