[swift-evolution] Inheritance with a Constrain

Thane Gill me at thanegill.com
Wed Dec 9 01:09:14 CST 2015


There have been many use cases that I’ve come across where I want to do something like this:

protocol SomeProtocol { }

extension Array: SomeProtocol where Element: SomeProtocol { }

This seems like a something that swift should move toward as it is a “protocol oriented language”. This would enable ease of building new libraries that need to extend collection types and other storage type classes in the standard library.

- Thane Gill



More information about the swift-evolution mailing list