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

David Owens II david at owensd.io
Fri Feb 12 00:28:05 CST 2016


I don’t know if this has been suggested already… but why not just use the same name and have an `inPlace` parameter with a default value?

x.sort()
x.sort(inPlace: false)

x.add(y)
x.add(y, inPlace: false)

x.intersect(y)
x.intersect(y, inPlace: false)

Having to come up with all of these different word forms is confusing and the English language is terrible an consistency; we have no real chance here.

-David


> On Feb 11, 2016, at 8:52 AM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> Hi All,
> 
> The API guidelines working group took up the issue of the InPlace suffix
> yesterday, and decided that it was not to be used anywhere in the
> standard library.  We are planning to apply the changes shown here
> <https://gist.github.com/dabrahams/d872556291a3cb797bd5> to the API of
> SetAlgebra (and consequently Set) to make it conform to the guidelines
> under development.
> 
> Comments welcome as usual,
> 
> -- 
> -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