[swift-evolution] API Guidelines: dropFirst?
Dave Abrahams
dabrahams at apple.com
Fri Jun 17 17:47:50 CDT 2016
on Thu Jun 16 2016, David Waite <david-AT-alkaline-solutions.com> wrote:
> I’ve always considered the term of art argument to be at least partially a red herring.
>
> These methods are difficult because you don’t have guarantees of
> non-mutability until you get to Collection - on Sequence, a dropFirst
> method may mean that neither the original nor returned sequence can
> address that item anymore. Names have to indicate that a Sequence may
> or may not consume an item.
>
> It makes me wonder if we should evaluate doing something more
> aggressive, such as eliminating the support of one-time/destructive
> Sequences completely.
That is something I've been considering, too. Another possibile
approach, though I admit I don't really understand how this one plays
out yet, would be to break the refinement relationship between Sequence
and Collection.
--
-Dave
More information about the swift-evolution
mailing list