|
|
|
|
|
by oddity
2896 days ago
|
|
The point of access modifiers is to get in the way. They're ways of allowing developers of one part of the source to control what the path of least resistance is for the users of that code. If you expose everything, someone will write code that depends against it and make it harder for you to improve or change it in the future. Tossing in roadblocks helps guide users to the better long-term path. It doesn't really matter for small teams, but it's essential for large ones without aggressive (and difficult) enforcement of contract between team members. |
|