Menu

Getter, Setter, Never?

Published on December 04, 2019 and filed under Software engineering
Written
by Zvonimir Spajic and will take

6 minutes

of your time.
In short
The 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.
Twitter logo

Want to see more articles like this in your inbox? You know what to do.

Written by

Zvonimir Spajic

Zvonimir is a passionate software developer from Croatia who worked for madewithlove from 2019 till 2020.

Related articles

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

Towards better code reviews

Towards better code reviews

Jonas Drieghe

July 14, 2020

Snapshot through the heart

Snapshot through the heart

Emma Fabre

July 02, 2020