[swift-evolution] [Review] SE-0111: Remove type system significance of function argument labels

Tino Heth 2th at gmx.de
Mon Jul 4 06:36:27 CDT 2016

> As has been discussed exhaustively in this thread, Swift 3 function labels don't convey the meaning of parameters, they are almost always prepositional phrases that don't make sense apart from the primary function name they are attached to.

Why should there be different rules for closures and regular functions?
If labels are considered useful, they are useful in both contexts, and it should not be forbidden to have labels for closure parameters.

The only thing I don't like now is that labels are added when the type is inferred; imho that doesn't make sense in deed, and it would be more consistent to strip them (when labels are part of the name, this is like silently changing variable names to match Hungarian notation ;-).

I'd hardly oppose anything that simplifies the type system, so I agree with Brent that it is ok to remove them first to re-introduce them in a better form later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160704/764d67d9/attachment.html>

More information about the swift-evolution mailing list