[swift-evolution] SetAlgebra naming update

Dave Abrahams dabrahams at apple.com
Fri Mar 25 16:45:29 CDT 2016

on Fri Mar 25 2016, davesweeris-AT-mac.com wrote:

> Can we rename `subtract` to `complement`, since that’s the correct
> term? At least, I’m assuming that’s what `subtract` means… if not, I’m
> confused.
> https://en.wikipedia.org/wiki/Set_(mathematics)#Complements

It's not just “complement,” because that means inverting set membership
of everything in a finite domain.  It would have to be “relative
complement.”  But “relative complement” lacks the directional
implication that plagues terms like “difference,” but not “subtracting.”

I think in this case “subtract” works better.

> - Dave Sweeris
>> On Mar 24, 2016, at 3:39 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>> Just an update:
>> The naming guidelines working group went back into negotiation over
>> the shape of SetAlgebra (and thus, Set and OptionSet) for
>> Swift 3, and reached a new consensus.  We intend to bring forward a
>> proposal for the API shown here:
>>  http://dabrahams.github.io/swift-naming/SetAlgebra-Math.html
>> and to update the guidelines to suggest using the "form" prefix to
>> create a verb phrase for a mutating method when the operation is
>> fundamentally non-mutating and described by a noun.
>> Regards,
>> -- 
>> Dave
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution


More information about the swift-evolution mailing list