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

Charles Srstka cocoadev at charlessoft.com
Mon Dec 28 19:33:32 CST 2015


> On Dec 28, 2015, at 6:19 PM, Michel Fortin via swift-evolution <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

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


More information about the swift-evolution mailing list