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 coming from Croatia but with current base in Berlin, Germany. Don't ask him anything in German yet though, he's still working on his sprachen-skills.

Learn more about Zvonimir Spajic

Related articles

Pointers and tips: dispelling the magic of git merge

Pointers and tips: dispelling the magic of git merge

Zvonimir Spajic

May 18, 2020

Introduction to Inertia.JS

Introduction to Inertia.JS

Tony Messias

April 24, 2020

Grandfathering in legacy

Grandfathering in legacy

Maarten Scholz

April 16, 2020