> In clean object-oriented code, the internal state of a class is not exposed to the outside.
So then you don't write getters and setters for that stuff in C#. I don't get your point here.
So then you don't write getters and setters for that stuff in C#. I don't get your point here.
What is the alternative to Getters / Setters (or, properties, which is basically just syntactic sugar) in an OO language?
The problem with taking encapsulation to an extreme is that you are trading off against flexibility. The more you hide your state the less any external party can implement their own logic using that state, and the more separate concerns have to be bundled into the class hiding the state because they can't be dealt with anywhere else. Everything in software design is a tradeoff.
I guess their brains simply deadlock.