[swift-evolution] Proposal: Update the API Design Guidelines to reflect current Standard Library method naming conventions
Dmitri Gribenko
gribozavr at gmail.com
Sun Dec 6 17:10:39 CST 2015
On Sun, Dec 6, 2015 at 3:03 PM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:
>
> On Dec 6, 2015, at 6:40 AM, Daniel Steinberg via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> I love that the team has released API Design Guidelines and find them very
> helpful. One piece of advice, however, seems to be at odds with current
> Standard Library practice.
>
> Currently the methods sort() and sortInPlace() are the non-mutating and
> mutating versions of sorting a collection. Similarly, there are pairs of
> methods in Set named union() and unionInPlace(), intersect() and
> intersectInPlace() and so on.
>
>
> Hi Daniel,
>
> This is a known issue, and it is because we want to keep Swift 2.2
> reasonable source compatible with Swift 2. The changes to the standard
> library will land after Swift 2.2 branches for its release in the spring.
>
> If you’re interested in more details on this effort, check out this blog
> post:
> https://swift.org/blog/swift-3-api-design/
>
> It includes a link to the diff-in-progress for the standard library.
>
Hi Chris,
I think Daniel is not highlighting the inconsistency, but saying that he
likes ~InPlace better:
On Dec 6, 2015, at 6:40 AM, Daniel Steinberg via swift-evolution <
swift-evolution at swift.org> wrote:
> Previously the sort methods were named sort() and sorted(). I never could
remember which is which.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151206/c89eb2f0/attachment.html>
More information about the swift-evolution
mailing list