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

Chris Lattner clattner at nondot.org
Sun Dec 3 13:23:32 CST 2017


> On Dec 3, 2017, at 10:54 AM, Thorsten Seitz <tseitz42 at icloud.com> wrote:
> 
>> 
>> At that point, there would be a general uproar because IUOs have high potential for abuse: Swift is “all about” strong types and safety, which IUOs undermine.  Strong optionals are considered a pain to use by some people and widely misunderstood (I think they are the biggest challenge in learning Swift in practice), and so it is a reasonable feature that people could pervasively adopt IUOs, leading to a much worse world all around.
>> 
>> 
>> This made up parallel universe is exactly analogous to what is happening now.  DynamicMemberLookup is no more dangerous and harmful than IUOs are.  
> 
> The difference is that IUOs are marked by a "!“ whereas dynamic member lookups look just like normal member lookups but unlike them can fail.

Matthew was primarily concerned about point of use, in which IUO dereferencing is completely implicit and invisible.

-Chris

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


More information about the swift-evolution mailing list