Hacker News new | ask | show | jobs
by rufugee 5056 days ago
That said, it hurts my brain to understand why in 2012 we're still forced to create our own empty getters and setters, and why there are no anonymous blocks. I know that closures/anonymous blocks are supposed to be delivered in java 8, but I'm not sure the elimination of redundant getters/setters are even on the road map. I'm so tired of opening classes which are comprised of 20% business logic and 80% getters/setters simply because one might need to override that behavior in the future. It really increases the noise.
4 comments

Oh, and the whole tendency of the java community to over-engineer everything...while it seems to be much less frequent these days, it's still there. Not so much on the Play side, but it can definitely still be found. That's one of the things which pushed my away from java back in the day...I was sooo tired of reading project docs five times and still not understanding what the hell someone was trying to say.
See Scala's case classes (http://www.scala-lang.org/node/258) - just move your 20% logic somewhere else.
Have you considered using Project Lombok? http://projectlombok.org/
I have. Little too magic for me.
C#'s solution to this is really nice too, not sure why they don't just copy it.