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

Erica Sadun erica at ericasadun.com
Thu Feb 11 13:26:34 CST 2016


xor is a well known and widely used synonym. "symmetricDifference" not so much. 

-- E


> On Feb 11, 2016, at 12:22 PM, Stephen Canon <scanon at apple.com> wrote:
> 
> 
>> On Feb 11, 2016, at 2:19 PM, Jacob Bandes-Storch via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> 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.
> 
> “exclusiveOr” is pretty awkward too.  I would tend to call this either “xor” or “symmetricDifference”.
> 
> – Steve

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


More information about the swift-evolution mailing list