[swift-evolution] [Review] SE-0006 Apply API Guidelines to the Standard Library

Ben Rimmington me at benrimmington.com
Fri Jan 22 18:46:38 CST 2016

Proposal link:


The `Sequence.split` methods both have a `maxSplits: Int = Int.max` parameter, but this parameter is unlabelled (i.e. a local-only name) in one of the methods. This is more obvious when looking at the documentation [1], which doesn't follow the Swift convention for local/external parameter names.

[1]: <https://developer.apple.com/library/ios/documentation/Swift/Reference/Swift_SequenceType_Protocol/>

Also, the naming convention proposed by David Owens II in the "named parameters" thread [2] would allow for default parameter values to be added later. For example, see the `SequenceType.joinWithSeparator` methods.

[2]: <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160118/007234.html>

-- Ben

More information about the swift-evolution mailing list