DEV Community

Discussion on: Do we really need getters/setters?

Collapse
 
awwsmm profile image
Andrew (he/him)

Private fields with getters and setters that do nothing other than get and set are totally pointless, you're right. It's the ability to interrupt the user's command and do something else before getting or before or after setting that makes them useful.