[swift-evolution] rename dropFirst() and dropLast()

Max Moiseev moiseev at apple.com
Fri Jan 1 15:08:32 CST 2016


Charles,
 
Guidelines are being applied to the Standard Library as part of Swift 3 effort. You can track progress in `swift-3-api-guidelines` branch.
Addressing your example: non-mutating `sort()` has become `sorted()` here <https://github.com/apple/swift/blob/swift-3-api-guidelines/stdlib/public/core/CollectionAlgorithms.swift.gyb#L213>.
 
max

> On Dec 28, 2015, at 5:33 PM, Charles Srstka via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> On Dec 28, 2015, at 6:19 PM, Michel Fortin via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Really? The convention says: "When a mutating method is described by a verb, name its non-mutating counterpart according to the “ed/ing” rule, e.g. the non-mutating versions of x.sort() and x.append(y) are x.sorted() and x.appending(y)."
> 
> That’s really ironic, given that sort() on Array in the standard library is the non-mutating version (the mutating version is called sortInPlace).
> 
> Charles
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160101/998f91e2/attachment.html>


More information about the swift-evolution mailing list