[swift-evolution] [Idea] Syntactic sugar for using methods as functions

admin at wheerd.de admin at wheerd.de
Tue Jun 28 07:38:15 CDT 2016


> This also can be done now:
> let reduced = foos.reduce(Foo(bar: 0), Foo.combine)
> 
> Are you suggesting to drop class name? That might make sense, but not
> for Swift 3.

That is what I am suggesting. Basically I would like to extend the .foo 
shorthand that already works for static members to methods in case the 
target type is a function type.

I guess I will bring it up again later after Swift 3 is done.

Kind regards, Manuel


More information about the swift-evolution mailing list