3 ms·
I don't understand why people still use Java these days. It feels like Java has become Spring. (Mostly producing spring developers) Alternative languages have
by monksy 5y ago
I don't understand why people still use Java these days. It feels like Java has become Spring. (Mostly producing spring developers)
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
- Koshkin 5y ago> why people still use Java these days Because of the Java ecosystem, e.g. https://projects.apache.org/projects.html?language https://projects.apache.org/projects.html?language https://marketplace.eclipse.org/ 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/ https://jackson.sh/posts/2021-04-java-underrated/ P.S. Perl's and Python's ecosystems are also great, but Java is (much) faster.
- deleted 5y ago[deleted]
- ithrow 5y agoThe only reason those alternate languages have buy in is because of the Java ecosystem, if Java fades aways those languages would likely fade away too. 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.
- monksy 5y agoI'm referring to java the language not the JVM. > 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)
- dboreham 5y agoScala codebases typically depend on reams of Java jar files.
- jayd16 5y ago>why not do var and val "final var" is more consistent in Java. Java in general is still a very versatile language with a lot of great tooling.