Suppose the following model: You want to create a client-server program.
Where, the client would make no sense without the server.
Is that a good reason to make the client a nested-type of the server?:
struct Server {
....
struct Client {
...
}
}
Also, another advantage I see, you can have so private methods in the server, that the client can access , but no one else can.
However, is this a good reason? Are there any drawbacks to this approach? Someone mentioned testability, that the client
is now not testable. Not sure if that's true.