[swift-evolution] [Proposal draft #2] Naming Functions with Argument Labels
matthew at anandabits.com
Mon Jan 11 15:51:53 CST 2016
> On Jan 11, 2016, at 3:42 PM, David Owens II via swift-evolution <swift-evolution at swift.org> wrote:
> I like the proposal. It does illustrate one of the naming conventions I really dislike with Swift (implicitly unnamed first parameter).
>> let fn1 = someView.insert(subview:aboveSubview:)
> Would have looked so much better. =)
I agree in this case, although there may be cases where unnamed arguments are still better. This seems like it is at least partly a problem with how existing Cocoa APIs are imported.
> Anyhow, +1 for the proposal.
Agree. +1 from me as well. This looks really good.
Now I’m looking forward to seeing more about lenses so we can also work with getters, setters, and subscripts.
>> On Jan 11, 2016, at 11:03 AM, Douglas Gregor via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Hi all,
>> I’ve updated and simplified my “Generalized Naming for Any Function” proposal to only deal with naming functions with argument labels, and dropping the back-ticks. Comments welcome! Proposal is here
>> https://github.com/DougGregor/swift-evolution/blob/generalized-naming/proposals/0000-generalized-naming.md <https://github.com/DougGregor/swift-evolution/blob/generalized-naming/proposals/0000-generalized-naming.md>
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution