[swift-dev] [Proposal] RangeReplaceableCollection should inherits from MutableCollection

Dave Abrahams dabrahams at apple.com
Tue Dec 5 16:55:56 CST 2017



Sent from my iPhone

> On Dec 5, 2017, at 12:19 AM, Cao, Jiannan via swift-dev <swift-dev at swift.org> wrote:
> 
> 
> But, I mean, what subscript (restrict to the length) could do is subset of p replaceSubrange could do, right?

True but that would imply the opposite of the refinement relationship you’re suggesting. A derived protocol has to have a subset of the behavior of the protocol it refines. 


More information about the swift-dev mailing list