3 ms·
It's not just the naming. It's the very existence of accessor methods/properties that are the anti-pattern, or at least code smell. At a minimum, they're as sme
by mcbits 7y ago
It's not just the naming. It's the very existence of accessor methods/properties that are the anti-pattern, or at least code smell. At a minimum, they're as smelly as exposing the object's internal state to external manipulation directly through public fields, and it's even more of a red flag if the accessors are liars and do things beyond simply getting/setting field values. (Obvious exception for DTOs and such, if you don't consider those a problem.)