by monksy · 4y ago · 0 comments
Alternative languages have branched off of the language and have succeeded with great buy in. (Clojure, Groovy [I think it's past it's heyday], Scala, Kotlin, etc]. However, java hasn't kept up. Yes, they copied a few nice things. However they're just surface level things. They're still encouraging people to write procedural code and worry about weird things that other frameworks take care of you. (Weird concurrency issues, DSLs, etc)
What I'm talking about:
- Pattern matching (this comes from scala) - They're slowly trying to give you something useful in a switch statement. It's no where near as expressive and extendable as what Scala gives you. (They went from int based, to string based, to some minor features for matching )
- Optional - this really hasn't been workable for those who are constructing functionality. It still feels like a procedural thing that is preventing you from writing if null, it doesn't avoid nesting in Java. In scala this is just apart of the flow of your code.
- Records- My understanding of the introduction of this is that it was a little different from POJOs and it broke external libraries. However, this is been a need since the days before Lombok. Additionally Groovy and Scala had this support.
- var.. ok nice you are now allowing for type inference.. but why not do var and val
A lot of these enhancements have been bandaids on the situation.. not full lets rethink some things and make them better
Because of the Java ecosystem, e.g.
https://projects.apache.org/projects.html?language
https://marketplace.eclipse.org/
Looking at this I sometimes cannot help thinking, "One must be insane not to use Java."
(I use C++.)
See also, e.g. https://jackson.sh/posts/2021-04-java-underrated/
P.S. Perl's and Python's ecosystems are also great, but Java is (much) faster.
"final var" is more consistent in Java.
Java in general is still a very versatile language with a lot of great tooling.
You really think AWS is going to be offering Clojure SDKs?
Remains to be seem for Kotlin but the others haven't grow enough to develop a big ecosystem of their own.
> AWS is going to be offering Clojure SDKs?
If enough people are using Clojure and it's nicer than using the aws-java-sdk. yes.
Scala has a pretty big ecosystem. There are lots of new and exciting things being built there. (This is what used to be the experimental frameworks, libraries and creative projects that used to exist in java)