Given the following interface
interface Modem {
public void Dial(string pno);
public void Hangup();
public void Send(char c);
public char Recv();
}
Uncle Bob writes
However, there are two responsibilities being shown here. The first responsibility is connection management. The second is data communication.
...
Should these two responsibilities be separated? That depends upon how the application is changing. If the application changes in ways that affect the signature of the connection functions, then the design will smell of Rigidity because the classes that call send and read will have to be recompiled and redeployed more often than we like.
Can anyone explain to me how is the highlighted statement true? Why would I have to recompile code that calls the sending/receiving methods if the connection signature changes? I could have injected a ready made connection to the code using it.