3 ms·
No, it says 'this is not meant for you to change from the outside'. It's an implementation detail, not part of the interface and any references to it are bound
by jacquesm 4y ago
No, it says 'this is not meant for you to change from the outside'. It's an implementation detail, not part of the interface and any references to it are bound to break without notice, warning or acceptance of the consequences.
Think of the interface to your class as a contract: this is how this class works, from now until eternity (or until the next breaking change ;) ). Relying on implementation details breaks that contract, the contract is on the interface not on the guts.
It won't be 'hard to change' it may be impossible to change. Because someone that relies on your class may not have access to the code of the other class!
- robalni 4y ago> any references to it are bound to break Do you mean that if someone changes a class member, they would not change in all places that use that class member? Why not? > someone that relies on your class may not have access to the code As I wrote in the clarification, I'm only interested in cases where everyone has access to all the code.