|
|
|
|
|
by hota_mazi
3147 days ago
|
|
> though I wish you could re-open 3rd party classes to make them conform to additional interfaces which you can do with Swift protocols. Mmmh really? I just reread the Protocol section of the Swift documentation and I didn't find this. If I have a class I can't modify and that doesn't conform to protocol `Foo`, can I make it conform to that protocol? A similar feature is being considered for Kotlin since this opens up all kinds of interesting mechanisms (notably, ad hoc polymorphism) but I don't see how to do that in Swift right now. |
|
Yes, you can.