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

Michel Fortin michel.fortin at michelf.ca
Mon Dec 28 18:49:49 CST 2015


Le 28 déc. 2015 à 19:25, Kevin Ballard <kevin at sb.org> a écrit :

> To add to this, existing Swift and Obj-C precedent says the mutating method will be named with "remove" (e.g. `removeFirst`). So the logical name for this based on the grammar rule is `removingFirst`, but that also sounds weird to me.

Sounds fine to me, but I'll admit not being a native English speaker. I know I would never have thought looking for `drop` when looking for the non-mutating version. Seems I'm not familiar enough with Rust and Haskell. It's a certainly a nice thing that if I began by writing `remove`, autocompletion would have suggested `removing`: no guesswork with synonyms to find the non-mutating variant.

-- 
Michel Fortin
https://michelf.ca



More information about the swift-evolution mailing list