[swift-evolution] Pitch: Compound name `foo(:)` for nullary functions

David Sweeris davesweeris at mac.com
Thu Feb 23 11:35:16 CST 2017


> On Feb 23, 2017, at 06:49, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Nice. That works well.
>> On Thu, Feb 23, 2017 at 08:36 Ben Rimmington <me at benrimmington.com> 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.

Yep, I think the backtick option is the best so far.

- Dave Sweeris 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170223/2d024ae3/attachment-0001.html>


More information about the swift-evolution mailing list