[swift-evolution] [Review] SE-0032: Add find method to SequenceType

David Waite david at alkaline-solutions.com
Thu Apr 28 21:48:44 CDT 2016


> The review of "SE-0032: Add find method to SequenceType" begins now and runs through May 3. The proposal is available here:
> https://github.com/apple/swift-evolution/blob/master/proposals/0032-sequencetype-find.md


> * What is your evaluation of the proposal?
-0 for naming reasons

> * Is the problem being addressed significant enough to warrant a change to Swift?
Sure
> 
> * Does this proposal fit well with the feel and direction of Swift?
Not entirely. Because Sequence operations are based on the iterator, and the iterator is not guaranteed to be either non-destructive/resetting or finite, a find method could lead to subtle bugs.

I would prefer either another name such as skipUntil, or that find exist on Collection which does have the guarantee of being non-destructive and resettable on iteration.

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

skipUntil is the closest I see in reactive programming sources, which process events as a stream rather than as a resettable cursor into a data structure.

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

A quick reading.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160428/28cd6f48/attachment.html>


More information about the swift-evolution mailing list