[swift-evolution] Will these two features be included in Swift 3?

Radosław Pietruszewski radexpl at gmail.com
Mon Dec 7 12:58:29 CST 2015

FWIW, I think most of the time it’s actually better to extend SequenceType rather than Array. I can’t think of many cases (for common code I would write), where an extension would be solely applicable to the Array type, and not all sequences (i.e. also array slices, etc.)
> I would love to see this feature if it is possible. You can’t currently create an extension on Array<Double> so a common work-around is to add your functionality to SequenceType where you constrain the Generator’s Element to be of type Double - this means I’ve added functionality in places beyond where it belongs.
> Daniel
> > On Dec 7, 2015, at 6:40 AM, Tuur Anton via swift-evolution <swift-evolution at swift.org <https://lists.swift.org/mailman/listinfo/swift-evolution>> wrote:
> > 
> > Can you please add these features in Swift 3?
> > 
> > 1. The ability to do this:
> > extension Array<Double> {
> >     //extend arrays of doubles
> > }
> > 

— Radek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151207/8f5825c1/attachment.html>

More information about the swift-evolution mailing list