This is clean, but given knowledge of foo(bar:) syntax, its discoverability
is low. Conversely, given knowledge of `foo()`, the discoverability of
foo(bar:) would be low compared to `foo(bar:)`.

If backticks were the *only* option, and also worked as `foo(bar:)`, the
consistency would be appealing. Although then if you had a function name
which needed backticks,  `foo`(bar:) would have to continue working, I
suppose, so only allowing `foo(bar:)` isn't feasible.

I imagine this would make for some very nice code completion, though —
`foo(#^...^#  could suggest the names of all the foo variants.


On Thu, Feb 23, 2017 at 6:36 AM, Ben Rimmington <[email protected]>
wrote:

>
> > On 23 Feb 2017, at 14:23, Xiaodi Wu wrote:
> >
> > What happens when you need the backticks for the function name itself?
> We can't nest them.
>
> func `class`() {}
>
> `class`() // Function call.
>
> `class()` // Function reference.
>
> -- Ben
>
>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to