On 6 November 2017 at 19:44, Tino Heth <2...@gmx.de> wrote: > to me protocol extensions are both cool and evil. cool as you can add > code. evil because it's more natural to add another declarations in those > extensions rather than implementation: > > protocol Foo { > func foo() > } > > extension Foo { > func bar() //*** natural assumption is that i can do this. but i > can't > } > > After a moment of reflection, I think I understand your reasoning — but > why should you want to do this? > Imho splitting types with extensions is already overused quite often, but > splitting a protocol makes no sense for me at all. >
the use case would be splitting my own big protocols into different parts for code organizing purposes (so it's within the module boundaries). Mike
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution