[swift-evolution] ed/ing, InPlace, Set/SetAlgebra naming resolution
dabrahams at apple.com
Sat Feb 13 13:32:12 CST 2016
on Sat Feb 13 2016, plx <swift-evolution at swift.org> wrote:
> On a skim, if there’s a specific explanation as to *why* `inPlace` is
> a now a no-go, I don’t see it.
Several justifications were given:
* Several people have an “ick” reaction when they see it.
* It's not in the guidelines.
* If we add it to the guidelines, it will only be as fallback
* If one of the three main collection types can't conform to the
recommendations of the non-last-resort guidelines, the guidelines are
> I can’t say I like the proposed changes
> very much, and I definitely don’t like some of the more-creative
> It’s hard to offer help when it’s not clear what was deemed
> problematic about the existing (and “perfectly fine with me”!) names.
> Separately, can I ask here why SetAlgebra protocol doesn’t contain an
> *overridable* method like `func intersects(other: Self) -> Bool`?
> (Note: I am *well-aware* that `a intersects b <=> !(a and b are disjoint)`).
There's no point in providing an override if there's no chance of it
being better than the default implementation.
> That absence has been puzzling me ever whichever release of Swift
> first introduced this protocol, particularly since e.g. both
> `isSubsetOf` and `isSupersetOf` are individually-overridable.
> (Likewise, but less so, I do wonder why the protocol doesn’t contain
> *overridable* `isStrictSubset` and `isStrictSuperset` functions,
Same reasoning, but we may have mistakenly decided there was no chance
of optimization. If so, please open a ticket.
>> On Feb 11, 2016, at 10: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,
>> swift-evolution mailing list
>> swift-evolution at swift.org
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution