News for hackers. Stuff that matters.
Re:Why I Don’t Regret Moving Our Android App to Scala by gregghz on Wednesday July 12, 2017 @10:58PM (#14758409)
you don't. Scala produces them automatically for case classes. Kotlin will treat x.count as x.getCount() if getCount exists and count doesn't. They are mostly a side effect of the tools and not strictly required.

Especially in Kotlin and Scala where data tends to be immutable by default there isn't much to gain by using getters.

If your "getter" is doing more than getting the value then maybe you should not call it a getter (imo).

Re:Why I Don’t Regret Moving Our Android App to Scala by lgas on Thursday July 13, 2017 @01:54AM (#14759029)
I think the heart of the question was more, if the members are already public, why does Scala need to produce getters for them, why not access the members directly?
Re:Why I Don’t Regret Moving Our Android App to Scala by gregghz on Thursday July 13, 2017 @03:14PM (#14764267)
I honestly don't know.
Re:Why I Don’t Regret Moving Our Android App to Scala by saghm on Wednesday July 12, 2017 @11:58PM (#14758586)
> If your "getter" is doing more than getting the value then maybe you should not call it a getter (imo)

I'd definitely agree there! In fact, I might go further and say that if your "getter" does more than just return a member, then by definition it isn't a getter