[swift-evolution] [Review] SE-0074: Implementation of Binary Search functions

Xiaodi Wu xiaodi.wu at gmail.com
Tue May 3 23:26:59 CDT 2016

>         * What is your evaluation of the proposal?

+1. These are self-evidently useful functions.

One issue: not sure I understand why the "customization points" are
necessary as part of this particular proposal. If it's to support "future
sorted collections," then the best motivating use cases would be found once
those have been proposed, and perhaps the "customization points" are best
bundled with them.

Nit: `sortedRange(of:)` could use a clearer name, maybe
`sortedIndexRange(of:)`, since it's indices that we're talking about.
Otherwise, it reads superficially like you might be getting a range of
*values* back.

        * Is the problem being addressed significant enough to warrant a
> change to Swift?


>         * Does this proposal fit well with the feel and direction of Swift?


>         * If you have used other languages or libraries with a similar
> feature, how do you feel that this proposal compares to those?

The proposal itself does a nice job of comparing these facilities to C++
counterparts. I suspect I've got less experience with those than the
authors themselves.

>         * How much effort did you put into your review? A glance, a quick
> reading, or an in-depth study?

I did a quick reading of the proposal; I've also used these algorithms
before and rolled my own binary search in Swift.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160503/9a6372f6/attachment.html>

More information about the swift-evolution mailing list