[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
map at kth.se
Mon Nov 27 10:12:07 CST 2017
> 27 Nov. 2017 22:38 Mathew Huusko V via swift-evolution <swift-evolution at swift.org> wrote:
> I tuned out the initial discussions of this proposal because there seemed to be a lot of noise centered around implementation/maintainability. I'm curious if the actual premise of the syntactic/sugar conversion has been discussed/debated yet? i.e. making dynamic/stringly calls look like normal calls is very clean, but it's also very misleading (by definition; they're not normal/safe/checked calls) with a potential net reduction in ergonomics.
There is nothing that is inherently non-fallible with "normal" Swift calls. As far as the caller can tell, any function or method you call can fail. There is no difference here; the implementation of the "user-defined dynamic member lookup" object will determine if you have called it in a proper way or not, in the same way as "+" will determine if you have called it in a way that overflows or not.
More information about the swift-evolution