Quantcast
Viewing all articles
Browse latest Browse all 38

Answer by Jean-Christophe Blanchard for Why use getters and setters/accessors?

Although not common for getter and setter, the use of these methods can also be used in AOP/proxy pattern uses.eg for auditing variable you can use AOP to audit update of any value.Without getter/setter it's not possible except changing the code everywhere.Personaly I have never used AOP for that, but it shows one more advantage of using getter/setter.


Viewing all articles
Browse latest Browse all 38

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>