by jt2190 · 9y ago · 0 comments
I only quibble on the "mindlessly" part. I will never add a get/set in a class if it isn't needed. But invariably, in a Java project, some library somewhere insists that I have them. So eventually I find I've reluctantly added them.
Sometimes you can get away with leaving them private, sometimes not. It's a pain in the neck and like many things in Java, it should have been sorted out years ago.
One thing I've noticed more and more over the years is this tendency for folks to do things that under analysis make no sense and have no benefit.
Even worse, I have a bad feeling that 20 years ago I was one of those people...
It definitely is the case that reflection in the JDK would be a very slow and ungainly way to do data access so I can see the 'bean' convention being a way around that.