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

James Hillhouse IV jimhillhouse at me.com
Sat Feb 13 00:17:05 CST 2016


> On Feb 12, 2016, at 10:28 PM, Ricardo Parada via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
> ALTERNATIVE 1
> 
> Non-mutable (noun-based)
> 
> -  func union(other: Self) -> Self
> +  func union(other: Self) -> Self		Assumes union is a noun, i.e. not a verb
>> 
> Mutable (verb-based)
> 
> -  mutating func unionInPlace(other: Self)
> +  mutating func unite(other: Self)
>
+1 for ALTERNATIVE 1.

Although 'union' is both a noun and a verb*, because 'unite' is more commonly used today when unioning things, I'm in favor of using it. ‘union/unite’ just flows better for me than ‘union/add’, but that’s just me.



*The OED entry for the verb ‘union’, 

http://www.oed.com/view/Entry/214680?redirectedFrom=Unioning#eid <http://www.oed.com/view/Entry/214680?redirectedFrom=Unioning#eid>
 

_______________________________________________
swift-evolution mailing list
swift-evolution at swift.org <mailto:swift-evolution at swift.org>
https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160213/08221f07/attachment.html>


More information about the swift-evolution mailing list