[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
Jean-Daniel
mailing at xenonium.com
Tue Nov 28 16:06:35 CST 2017
> Le 28 nov. 2017 à 22:56, Ben Rimmington via swift-evolution <swift-evolution at swift.org> a écrit :
>
> I suggest using different subscripts for function/method calls and properties:
>
While I perfectly understand why subscript is the best way to represent dynamic property, I don’t get how it help to abuse it to implement dynamic methods. Methods are not l-value, so why do you want to use a subscript for them ?
> * `value(...)` ==> `value[dynamicFunction: ""](...)`
> * `value.name(...)` ==> `value[dynamicFunction: "name"](...)`
> * `value.name` ==> `value[dynamicProperty: "name"]`
> …
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list