Hello!

I have a question not directly related to D as it is with coding standards.

My issue at hand is if I have one variable for a class, which I want to be directly accessible for anything else, should it be
 1. public, or
 2. private, with @property get/setters?

From what I have been told is that variables should be private. But if I do not want to make any checks whatsoever when setting a variable, I see no benefit to the private approach.

Are there any other reasons to use get/setters?

Reply via email to