5 ms·
As a developer who used Java for 12 years, I don't really like the direction Java takes. It's not happening like you're trying to describe. Java have some weak
by vbezhenar 6y ago
As a developer who used Java for 12 years, I don't really like the direction Java takes. It's not happening like you're trying to describe. Java have some weak points which could be addressed easily. For example properties are relatively easy to implement, but instead developers decided to implement records which are very different. Modules are weird thing that nobody asked for and they broke old code (what a blasphemy in Java world). And still I'm not aware of any useful modules use-cases. They throw out Java EE instead of improving it.
I'm sure that Java developers have a vision which they're moving to. They're trying to convert old language into a new one with immutable classes, pattern-matching, green threads, modular JVM, all that stuff. May be I'll like that new language, but so far I'm a little bit unsatisfied. And, as it seems, young people are not that impressed either.
- jcadam 6y agoI think Kotlin is pretty much what a modernized Java should be. Between it and Clojure I don't spend very much time with Java anymore.
- jackcviers3 6y agoKotlin could he better, but doesn't go all the way. Without HKTs and implicit injection, Java is going to eat its lunch. Java already has records, type inference, parametric null safety with Optional, Loom provides coroutines, vavr and streaming apis have given us theabilitytodo FP... what's left as a unique feature? Kotlin will survive because it was picked for Android to avoid copyright issues. But the difference between the two languages is vanishing small.
- blacktriangle 6y agoCould you clarify the point on Android and copyright issues? At least at the time in 2017 when Google blessed Kotlin as an officially supported language, it seemed like the reasoning was Kotlin was far more ergonomic than Java. How does copyright come into this?
- alcidesfonseca 6y agoOracle suited Google for copying the APIs (not the implementation) of the Java standard APIs. It all started in 2010 [0] Kotlin was Google's backup if the suit went Oracle's way. [0] https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_....
- blacktriangle 6y agoI guess given the recent court ruling we should see if Google sticks with Kotlin as a hedge, sticks with Kotlin because the community has embraced it, or pulls away from Kotlin as a no longer needed source of extra work.
- jcadam 6y agoIt's Google. They'll probably come up with a completely new programming language which they'll force on the community in some ham fisted way, then suddenly drop it in a few years when they can't figure out a way to massively monetize it.
- mhoad 6y agoI thought that was Dart. Which is honestly a shame because it’s a genuinely great language. But it does very much fit the bill otherwise
- cutler 6y agoNot really. Dart is single-threaded which was a mistake Google made in trying to keep it JS-compatible. If Dart had been multi-threaded from the start it might have stood a chance.
- blacktriangle 6y agoDart always stuck me as a solution looking for a problem, particularly in lite of more recent progress in JS itself. Can I ask why you think its a genuinely great language worth looking at?
- nine_k 6y agoWhen Java gets the Kotlin's brilliant "last argument of lambda type can be a block", let me know. It allows to massively extend the perceived syntax of the language where needed, and create nice, typechecked DSLs. A number of small ergonomic improvements is also impossible to port to Java. And I'm definitely happy that Java does not feature implicit injection, which looks so cool but is so painful to work with in Scala. When I need HKTs, I can pick a perfectly good Haskell :) I'm afraid Java or even Kotlin will never achieve this level of FP-ness; for that, a language should be designed differently. Rust, OTOH, likely will.
- cutler 6y agoAgreed re Scala's implicits. They've just repackaged them for Scala 3 as given/using but it's the same confusing nonsense that drove me away from the language.
- cutler 6y agoDream on. Java, even including upcoming features, has nowhere near what's included in Kotlin out of the box. Nullability? Extension methods? First class functions? I could go on. Kotlin is much more than a better Java.
- kaba0 6y ago> For example properties are relatively easy to implement, but instead developers decided to implement records which are very different But why would they bake in a misfeature? Yeah it is popular, but was never a good idea to begin with. Records and new language features try to slowly shift the focus to a more immutable, FP-oriented style of OOP, which is imo a good decision. Of course it doesn’t make imperative code legacy, the two worlds can coexist perfectly. > Modules are weird thing that nobody asked for This is the feature that allows the JDK team to do their work. You either expose the internals and freeze it, effectively killing the platform, or encapsulate it. It is/was a great decision, and it didn’t broke too many things.
- vips7L 6y agoProviding records was never about providing properties, but yes I agree properties would be a great addition. > They throw out Java EE instead of improving it Giving EE to the Eclipse foundation and transitioning it to Jakarta EE is about improving it. It allows the Eclipse foundation to move faster without having to go through the JDK standardization process.
- vbezhenar 6y agoThe first thing they did is performed source-incompatible change of package names. That's hardly improving in my book, more like sabotaging. I understand that's because of trademarks, but that's another issue: why didn't Oracle provide all the necessary legal protections at least for package names.
- chris_j 6y agoA cynic might suggest that Oracle deliberately sabotaged Java EE because competitors like IBM and RedHat had beaten it in the marketplace and were making all the money off it.