3 ms·
I saw this, and was reminded that OO languages have language constructs to enforce this, i.e. the "private" keyword. If you want to make something private (e.g
by adrianmsmith 14y ago
I saw this, and was reminded that OO languages have language constructs to enforce this, i.e. the "private" keyword.
If you want to make something private (e.g. your internal implementation) it's better to make it private (resulting in an error if someone accesses it) than to make it public, and write a rule in section 3.11 of a convention document and hope everyone using your code has read it and obeys it.
- qu4z-2 14y agoExcept that the rule there is equally applicable to OO languages, and is more about what you should and shouldn't expose in your interface.