Swift 2b3: It’s kinda weird that protocols can provide internal labels for parameters

Originator:rix.rob
Number:rdar://21783914 Date Originated:11-Jul-2015 09:50 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A152u)
Classification:Other Bug Reproducible:Always
 
Summary:
Protocols can provide internal labels for method/constructor parameters, like the init in StringLiteralConvertible:

init(stringLiteral value: Self.StringLiteralType)

That’s pretty weird. It’s not actually a requirement, so what’s it doing in a protocol at all?

I’d rather just have init(stringLiteral: Self.StringLiteralType) and add an internal label myself if I want one. Particularly so since `value` is less meaningful than the external label.


Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
N/A

Regression:
N/A

Notes:
N/A

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!