Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
joeblubaugh
· 8mo ago · 0 comments
In fact it was “the Java way” for many years and “useless getters” was always a big complaint about Java.
Comments
[–]
oefrha
8mo ago
Hey it's better in Go. In Java it's getFoo(). In Go it's just Foo(). Saves three bytes, and three keystrokes if you program by hand and don't autocomplete!
[–]
gf000
8mo ago
I do agree to a certain degree, but with getters/setters you could properly hide/set to read-only fields.