Getter, Setter, Never?
Published on December 04, 2019 and filed under Software engineering
Written by Zvonimir Spajic and will take
Written by Zvonimir Spajic and will take
6 minutes
of your time.In shortThe rigmarole of starting a new project can be tedious. You have to create a bunch of basic classes and fill in all their getters and setters. Luckily your IDE can automate this for you. But should you even generate these methods? Take a look at when getters and setters are an anti pattern. Learn how to improve your classes and readability of your code.
Want to see more articles like this in your inbox? You know what to do.
Related articles
Creating a Scientific Pitch Notation Type using template literal types
Creating a Scientific Pitch Notation Type using template literal types
Geoffrey Dhuyvetters
February 24, 2021
12 Factors in the era of containers
12 Factors in the era of containers
Tony Messias
January 29, 2021
Querying your Redux store with GraphQL
Querying your Redux store with GraphQL
Emma Fabre
December 21, 2020