Getter, Setter, Never?
Published on December 04, 2019 and filed under Software engineering
Written by Yannick De Pauw and will take
Written by Yannick De Pauw 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.
Written by
Yannick De Pauw
Making sure the people around him are happy, things look pretty and products reach a greater audience,... that's why this people & marketing manager sets his alarm clock on weekdays.
Related articles
Querying your Redux store with GraphQL
Querying your Redux store with GraphQL
Emma Fabre
December 21, 2020
Serverless functions with Vercel
Serverless functions with Vercel
Geoffrey Dhuyvetters
September 02, 2020
I'm starting a greenfield project and I'm terrified.
I'm starting a greenfield project and I'm terrified.
Jonas Drieghe
August 04, 2020