[Proposal draft] Generalized Naming for Any Function

(Patrick Smith) #1

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.