|
|
|
|
|
by barrkel
5807 days ago
|
|
It's precisely because you can't predict everything that people will do with your library that you limit its extensibility to only those situations you've designed for. That way, when you come out with the next version, you have a much higher expectation that you won't be breaking users' code, and those users will be far less upset at you. It's not about treating everyone like idiots. It's about responsibly designing for and managing change over time. And thus you should almost always make fields private, make methods non-virtual, make classes final / sealed, etc., except in those situations where you've carefully considered the ramifications and designed for them. |
|