[Proposal: 
https://github.com/apple/swift-evolution/blob/master/proposals/0161-key-paths.md
 
<https://github.com/apple/swift-evolution/blob/master/proposals/0161-key-paths.md>]

Hi, David, Michael, Joe. I'm sorry to admit I haven't been keeping up with all 
the discussion on this proposal, but I do want to ask a very important 
implementation question: how will key paths be represented? Specifically, I'm 
concerned about it possibly using reflection metadata, which contributes to 
both code size bloat and secrecy leaks. (Imagine the metadata for a property 
'shouldConnectToDishwasherOSDevice" appearing in a new build of the iOS 
simulator.)

I can imagine a very simple but inefficient implementation strategy that's 
based around something like closures, and a more efficient one that would 
directly code-generate offsets for structs (and use symbolic offsets when doing 
cross-module generation). Both of these would sidestep the use of reflection 
metadata. Is that more what you were thinking?

(sorry for opening the Pandora's Box of "I should be able to introspect types 
in the libraries I use" again)

Jordan
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to