Originally Posted by compavalanche
I always use getters and setters. Imagine if you have a large software application your writing with multiple developers.
You start your class out that will be used by other team members.
You expose a field to them. They start to use that field all throughout their code. Now you say hmm I want to log whenever someone accesses this field, or now this field is going to be generated somehow.
If you have that field directly in your clients code you no longer have the ability to change the behavior without changing the interface.
To me this is a strong reason to always use getters/setters. You expose the interface and your free to modify it as you see fit.