Quantcast
Viewing latest article 33
Browse Latest Browse All 38

Answer by Pete for Why use getters and setters/accessors?

Additionally, this is to "future-proof" your class. In particular, changing from a field to a property is an ABI break, so if you do later decide that you need more logic than just "set/get the field", then you need to break ABI, which of course creates problems for anything else already compiled against your class.


Viewing latest article 33
Browse Latest Browse All 38

Trending Articles



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