class X: Interface1, Delegate1, Delegate2 {
var sharedVariable = true
.... very long code comes here, that implements the delegates ...
}
How can I now break down this long class? I was thinking of using extensions, something like
extension X: Delegate1 {
// .. some code here, uses sharedVariable
}
extension X:Delegate2 {
// and some here, also uses sharedVariable
}
The problem with this approach is, that since both extensions use the sharedVariable, there is not much use breaking it down to extensions... Or is it? What else can I do with it?