[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution

Erica Sadun erica at ericasadun.com
Thu Feb 11 13:25:56 CST 2016


I see the -ed versions as short for -edSet, with the Set being implied. Under this reasoning, unioned == unionedSet, intersected == intersectedSet, thus acting as nouns not verbs, and used for non-mutating application.

inPlace is only for mutating application. I mildly prefer the shorter union to unionInPlace, although I could argue both sides. (The latter is clearer but longer, the former is the short verb action that the whole guideline thing is supposed to endorse.)

-- E

> On Feb 11, 2016, at 12:19 PM, Jacob Bandes-Storch <jtbandes at gmail.com> wrote:
> 
> On Thu, Feb 11, 2016 at 11:09 AM, Erica Sadun via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> Non-Mutating, returning new value: unioned(with), intersected(with), exclusiveOred(with)
> 
> Reasoning:
> 
> * I think the -ing endings sound unnatural, stilted, and unmathematical. They make me wince.
> 
> So do the -ed versions, IMO. That's why -InPlace is such a convenient suffix.
> 
> Jacob

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


More information about the swift-evolution mailing list