So, if want to change the implementation later of the reference: "public Engine engine"? but 100,000 other classes have directly access, what do you recommend to do?
if before to get a value i need to make some validation, what do you recommend me to do?
Sorry if it wasn't clear. First, I would recommend not making it public to begin with, and definitely not for 100,000 other classes to have access. If you need to make some validation before getting the value, definitely keep the variable private and expose a well-named method instead.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So, if want to change the implementation later of the reference: "public Engine engine"? but 100,000 other classes have directly access, what do you recommend to do?
if before to get a value i need to make some validation, what do you recommend me to do?
Sorry if it wasn't clear. First, I would recommend not making it public to begin with, and definitely not for 100,000 other classes to have access. If you need to make some validation before getting the value, definitely keep the variable private and expose a well-named method instead.