Leaving aside what is correct and what is not, I have problems putting these two sentences from the chat together (from a purelly technical low-level POV).
-
We can do any change in the
WhateverImpl
classes without affecting ABI compatibility "because users of library does not use Impl". -
A change in the public
Bcache
breaks ABI compatibility "for all programs linked to libstorage-ng, no matter if bcache stuff is used at all".
Why changing the Bcache
class has an binary influence in the other public classes but changing WhateverImpl
does not?
How are they different in that regard? As I understand, the fact that WhateverImpl
is non-public is a convention, not something the compiler knows.
(2) is oversimplifying things a lot.
It is safe to extend the Bcache class.
It is not safe to modify its behavior, the semantics of any parameters to its methods (including the constructors!), or to remove any method.