DEV Community

Discussion on: What programming best practice do you disagree with?

 
michaeldober profile image
Michael Ober

Getters and Setters allow you to validate and normalize input. If this validation isn't needed then consider a public field.