Classes have public properties that can be accessed directly and protected properties that you want accessed by setters and getters so that processing can be done. It’s a tale as old as time, do you create setters and getters for all properties or just try to remember which is which. Thankfully Shawn Stratton has provided an interesting and workable solution in his post, “Accesors and Religion”
Today I’m going to become flame bait, I’m going to talk about something that’s highly controversial, not because most view points on it are wrong but because everyones differ and they’re all wrong besides mine. Well there went my attempt at being sarcastic, but seriously, this is one of those discussions that will always be highly controversial.
Shawn has never been shy about being right. His solution presented though is workable. Whether it fits in a real-world scenario is a different question and one each reader will have to answer for themselves. Click on over and give Shawn’s solution a look. Leave him a comment telling him whether you like it or not and whether you can actually implement it in your project.