[swift-evolution] [Proposal] Allow enumerating cases in enumerations
Brent Royal-Gordon
brent at architechies.com
Mon Jul 4 13:21:10 CDT 2016
> On Jul 4, 2016, at 10:43 AM, Leonardo Pessoa <me at lmpessoa.com> wrote:
>
> My issue with this being opt-in is third-party libraries.
That's why we have retroactive modeling. :^)
import SomeEnumKit
extension SomeEnum: ValuesEnumerable {}
You can extend another module's public enum to add conformance to a protocol, and there's no reason it can't generate the code in your module instead of theirs.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list