[swift-evolution] SetAlgebra naming update
xiaodi.wu at gmail.com
Thu Mar 24 22:25:22 CDT 2016
On Thu, Mar 24, 2016 at 7:23 PM, Dave Abrahams via swift-evolution
<swift-evolution at swift.org> wrote:
> on Thu Mar 24 2016, Xiaodi Wu <swift-evolution at swift.org> wrote:
>> Much improved, IMO. A few thoughts:
>> * typo in "formSymmetricDifference"
> Thanks, fixed.
>> * I don't know about the preposition "from" in "form symmetric difference
>> from" (also, inconsistent, because you don't have "form union with")
> Good point. What would you suggest? We could use “with:” everywhere in
> the “formXXX” methods...
For the nonmutating method, maybe just `x = y.symmetricDifference(z)`.
Prepositions are useful to have because they clarify the relationship
between two or more things--but here, by construction, it's symmetric.
For the mutating methods, either `y.formXXX(with: z)` or
`y.formXXX(z)` look good to me.
>> * "form" is fine, but scans similarly to "from" when reading quickly
> That's a good point. Maybe that's another good reason to drop “from:”
> as a preposition in formSymmetricDifference.
More information about the swift-evolution