I\'m reading the book \"Clean Code\" and am struggling with a concept. When discussing Objects and Data Structures, it states the following:
In pure OO "a real object" has to completely hide the data it uses to fulfill its responsibility. So exposing internal data has to be avoided, no matter if this is done by a public field, a public property or public getter/setter functions.
Internal data IS NOR HIDDEN NEITHER ABSTRACTED just by routing access to it through a property!
To answer your question: - Avoid public properties if you are writing an object - Use public propertiers if you are writing data structures (a public field would do the job, too)