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

Mike Kluev mike.kluev at gmail.com
Sat Dec 2 13:53:43 CST 2017

Correct me if I’m wrong, but to me it looks like the main objectives to this proposal are cleared once we make it either a DynamicObject (vs a dynamic protocol) or we restrict this protocol adoptions to be only possible from within the main body of types, so in no way it will be possible to retrospectively extend, say, NSObject to conform to this protocol. Cool.

About the only bit missing is autocomplete and other mentioned things like goto definition, indexing, etc... IMHO these are not that important... but ok, assuming they are... we have a precedent of image literals to effectively “autocomplete” UIImage(named: “string”), perhaps we can have a similarity machinery that can autocomplete the relevant python method names and check for the typos. all during compile time.


More information about the swift-evolution mailing list