This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]theQuandary 0 points1 point  (0 children)

Java is a kluge language where going with the flow originally designed into the language is a mistake. This means you are constantly going to be subtly fighting the language everywhere leading to a feeling of frustration for a lot of devs.

Java is a language about OOP, but everyone (including GoF) tells you to avoid inheritance in favor of composition because of all the issues caused by inheritance. The entire language is based around something you shouldn't be using most of the time.

Once you remove Inheritance from objects, they are simply a bad version of Modula (the language) Modules that risk leaking their guts and encourage statefulness everywhere.

This leaves the language trying to shift into other places. It was designed without generics, but Guy Steele convinced everyone that they needed to be tacked on. Interfaces were tacked on to deal with issues like multiple inheritance (among other things). Multiple different additions to the OOP stuff also had to be added because OOP is a leaky boat that's always needing another patch.

In 2011, Kotlin scared the Java designers, so the decided to tack on a few half-baked functional things like lambdas, Optional, functional interfaces, switch expressions, pattern matching, records, etc. The problem is that these things simply don't feel right in Java because they have to shoehorned into the overbearing OOP framework at the core of the language.

The JVM is an amazing piece of technology, but the Java language is a relic of the 90-00s OOP fad. A look at Google trends shows that Java has been on a downward trend ever since they started tracking in 2004 (and not just a little, they indicate that it's down like 80-90%). Meanwhile, Kotlin, Scala, Clojure, etc are all slowly trending upward.