[swift-evolution] [Proposal draft] Generalized Naming for Any Function

Patrick Smith pgwsmith at gmail.com
Tue Dec 29 19:14:00 CST 2015


Hi all, hope I’m not adding to what has already been said.
Instead of:
let fn = someView.insertSubview(_:at:)
Could you have:
let fn = someView.insertSubview(_ at: _)
Basically like unused parameters in reverse.
Filling out all parameters with _ would return a function to the method, like the behaviour proposed. The advantages would be consistency, readability, and compatibility with autocomplete.
Additionally this could possibly lead to partial parameter application, but that’s outside the scope of what is being discussed.
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151230/4ba857c4/attachment.html>


More information about the swift-evolution mailing list