> On Nov 28, 2017, at 1:55 PM, Ben Rimmington <m...@benrimmington.com> wrote:
> 
> I suggest using different subscripts for function/method calls and properties:
> 
> * `value(...)`      ==> `value[dynamicFunction: ""](...)`
> * `value.name(...)` ==> `value[dynamicFunction: "name"](...)`
> * `value.name`      ==> `value[dynamicProperty: "name"]`
> 
> Dynamic callable types have an unnamed method.
> Dynamic argument labels are always allowed (but can be ignored).
> For example, the labels of `Date.UTC` below are not passed to JavaScript.

Hi Ben,

This proposal has nothing to do with “callables”, just dynamics member lookup.  
The other proposal: 
https://gist.github.com/lattner/a6257f425f55fe39fd6ac7a2354d693d 
<https://gist.github.com/lattner/a6257f425f55fe39fd6ac7a2354d693d> (which I 
need to revise a bit) relates to dynamic callable stuff, and it does in fact 
have a “DynamicCallableWithKeywordsToo” form that provides what you are asking 
for IIUC.

There is no need to model calls as subscripts though, because syntactic calls 
in swift (intentionally) do not produce lvalues.

-Chris

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to