[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
spestov at apple.com
Fri Dec 1 00:26:42 CST 2017
> On Nov 30, 2017, at 10:23 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> The difference between it and AnyObject lookup is that AnyObject lookup is:
> b) type unsafe
Can you explain in what sense AnyObject lookup is type unsafe where your proposal is type safe? Both seem type safe in the sense that your program will not hit undefined behavior at runtime and instead trap if you access a non-existent member; both are type unsafe in the sense that you cannot reason statically about whether any specific member lookup will succeed. What is the distinguishing characteristic between the two that makes one safe and the other not?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution