Better HN
topnewbestaskshowjobs
Log inSign up

c00lc4t95

3 karma · joined Jan 5, 2021 (5y ago) · 1 submissions

Submissions

comment 5y ago · link · parent

Java developer 6yrs here. I've worked in code bases and extended internal libraries that forgo the getters/setters model, for exposing member variables directly, and it's not better.

If you ever need to change something about that value, do additional logic before returning (I e. emit metrics), or model a data class with an interface having getter methods makes these so much easier.