Edit: Okay, I got a lot of interesting comments here when I just made a joke. Still, it is fun to read it all and to see just bow dedicated the Java guys are to their language
I'm happy that in our company we moved (still moving actually) to Java 11, newer projects at least. My colleagues are still afraid of using var though, so nothing changed really.
This was not my experience when my company migrated java 8 -> 11. We saw a number of our services increase RSS size by around 1gb. There was oddly no accounting for the increase in memory size in the heap dumps or native memory tracking, we eventually just accepted that some services would use more memory.
Do you mean that there's more heap consumed by data or that the Java process takes up more RAM from the OS? If it's the former, it is indeed strange and does require investigation (e.g. the footprint of most strings has been nearly halved in JDK 9, and this is the general trend of overall footprint we see). If the latter, it's probably a simple matter of different defaults. Remember that a Java process takes as much RAM as you tell it; if you don't, it will take up some heuristically-chosen default value that can change significantly from one release to another (I think that the default for G1, which is the default GC since 9, is to now take up 1/4 of total RAM unless you tell it otherwise).
Already know the type, or don't care about the specific type. getObjects() obviously returns a container of Objects, you probably don't care what kind of container.
To an extent, assuming names are sensible. Personally I'd use var everywhere if it was just myself, but when working on a team I need to assure everybody can figure it out quickly.
"I burned my mouse years ago on a stake and exclusively use heavily modified VI running on a Raspberry clone I built with silicone dug up in my backyard"
They are idiots if that's their reasoning, because type inference is not dynamic typing by any means.
With dynamic typing the type is determined at runtime and can change during execution. In a statically typed language with type inference the type is still determined at compile time and can't change during execution, all the guarantees from the type system are still there. The only thing that changes is how readable the code is.
I work in a large corporation, and I have been advocating for newest Java versions. I am also running all my domain's microservices on Java 14. Will move to Java 15.
Where I work we were using Java 6 when I joined. 7 had just released 9 months earlier. Earlier the next year I went to a conference at Google about all the cool features that would be in Java 8. At the end of the year we upgrade our new stack to Java 7 but most of the company is stuck on the old stack. 6 years later they make the new stack with Java 7 mandatory company wide. We just released a new stack earlier this year that uses Java 8. We've been migrating to it all year just for our one team.
I mean, yeah, JDK 11 was the last long term support version. Using JDK 15 just means you will have to move off of it in like 6 months if you want security updates.
I'm still maintaining a Java 7 Swing application, because it has to use a Microsoft Access database, and the JDBC driver for Access was removed from JDK in Java 8. When I first encountered I was tasked to add a new report for some new classification number and not do any work on upgrading or porting as the application would be obsolete "by the end of next year"; this was in 2016. I was kind of surprised to see that the driver was removed from JDK, especially considering how big of a selling point backwards compatibility is for Java.
I think backwards comparability is not very good for the industry. I like what google has done with angular where they might depreciated or remove one function per release and make upgrading very easy or adding tooling you can run to auto upgrade code. This was back in Angular2/4 though so idk if it has changed now.
I understand why backwards comparability is good and not disagreeing its bad in any way, just that it can really stagnate you as a whole if your language / framework is not willing to keep up with the times.
We see c++ where they keep just adding stuff. At least java is trying to clean-up some.
215
u/Ravoos Sep 15 '20 edited Sep 15 '20
Java devs: Cool.....I'm still using Java 8 tough.
Edit: Okay, I got a lot of interesting comments here when I just made a joke. Still, it is fun to read it all and to see just bow dedicated the Java guys are to their language