| ▲ | bigfishrunning 7 hours ago |
| "private function" doesn't mean "you can't know about this", it means "you shouldn't rely on this as a stable interface to my code". Just because you can use the information you have to call a given function, doesn't mean you aren't violating an interface. |
|
| ▲ | zabzonk 7 hours ago | parent [-] |
| my point was that f() had been defined static then you can't access it from outside the translation unit it is defined in - in other words, it is "private". i'm afraid i'm unclear what your point is. |
| |
| ▲ | Nevermark an hour ago | parent [-] | | Both points are related and matter. For most purposes, not being able to access something, and being able to access something not officially in an interface, where doing so introduces an unpredictable breaking dependency, the practical result is the same: You can't (actually/sensibly) do it. | | |
| ▲ | zabzonk an hour ago | parent [-] | | Then why not define "something" as static, which makes the compiler and linker guarantee that you can't do it? | | |
| ▲ | bigfishrunning an hour ago | parent [-] | | What if I want to internally access it from multiple compilation units, but not necessarily encourage downstream users from using it? This is really common. |
|
|
|