3 ms·
Perhaps that counts as an argument against accessor methods?
by eru 17y ago
Perhaps that counts as an argument against accessor methods?
- moconnor 17y agoYes! You can never have too many arguments against accessor methods...
- NickPollard 17y agoIt's an argument against using accessors for the sake of using accessors. It's important when learning any technique (and this goes not just for programming) to understand why that technique makes sense in this situation, which means that you can evaluate later situations on a case-by-case basis and decide whether or not that technique fits. Too often people believe that a technique is good (Inheritance is good!) without fully appreciating why (Polymorphism). This means they start using it for other situations (code reuse) when it might make sense to do it another way (composition).
- eru 17y agoThanks for interpreting my comment as more thoughtful than the blunt stab at OOP I wrote.