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

Joe DeCapo snoogansbc at gmail.com
Wed Dec 6 12:54:15 CST 2017


> On Dec 6, 2017, at 12:39 PM, Thorsten Seitz via swift-evolution <swift-evolution at swift.org> wrote:
> 
> IUO is Swift’s equivalent to a null pointer and those are a _hole_ in the type system (this applies to all type systems having an equivalent to the null pointer). That is why such types are marked with "!“ in Swift.
> This does not mean that Swift has no type system but that it’s type system has carefully marked holes.

But the types are only marked with "!" at the declaration site, just as types conforming to DynamicMemberLookup and DynamicCallable would be marked at the declaration site. There's no more indication at the call site that something is an IUO than there would be for something conforming to these protocols. They both require inspecting the type itself.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171206/57ecfa8d/attachment.html>


More information about the swift-evolution mailing list