User Profile
Collapse
-
Using getters setters inside a object / constructor?
What do you guys think about this? I use getters and setters in private methods inside a object instead of the property. I don't think it's useful in constructors but I use it always in private methods even though I have direct access, I just find it better due to setter | mutator validation. My professor thinks it's a bad pratice. What do you guys think about this?Last edited by Niheel; Feb 21 '21, 12:32 AM.
No activity results to display
Show More