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

Chris Lattner clattner at nondot.org
Mon Dec 4 12:45:47 CST 2017


> On Dec 4, 2017, at 10:28 AM, Tino Heth <2th at gmx.de> wrote:
> 
> 
>> The strongest your argument can be is “someone could use dynamic member lookup in their API to produce an API with a footgun that hurts their users”.  I submit for your consideration that there are lots and lots of ways that people can create poor APIs that hurt users.  If someone uses this feature inappropriately, then their API is crappy and you shouldn’t use it, just like any other misuse of languages features.  
> 
> 
> The two proposals have benefits, but they have risks as well — and imho nobody can foresee their full impact now.

It is easy to forsee the impact.  Simply look to other language communities that have done similar things.  C# added “dynamic” late in its evolution, which has even more power than what is being proposed here.  What evidence of abuse have you seen?

-Chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171204/dedf3849/attachment.html>


More information about the swift-evolution mailing list