[swift-evolution] API Guidelines: dropFirst?

David Waite david at alkaline-solutions.com
Thu Jun 16 10:51:10 CDT 2016


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.

-DW

> On Jun 16, 2016, at 8:45 AM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> on Thu Jun 16 2016, Jonathan Hull <swift-evolution at swift.org> wrote:
> 
>> …Thus, I don’t really see the harm in renaming these to match the rest
>> of Swift.  It won’t cause any confusion that can’t be easily recovered
>> from.  
> 
> I'm beginning to think you may be right.
> 
> -- 
> -Dave
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list