Live data from Hacker News

Java 25 officially released

mail.openjdk.org

121–130 of 260 posts

Re: Java 25 officially released

#121

(not a Java developer, no dog in this fight) I'm not sure I like the module import system very much. I think `import *`-like constructions make code a bit easier to write, but much harder to read, especially for developers new to the language / codebase. C# and Nim love that style, and it makes them almost unreadable without a good IDE. Personally, I much prefer Python's "short aliases" style, e.g. `import torch.nn.f…

I have never understood complaints about language constructs that don't make sense without an IDE. You have an IDE, it is where you are viewing the code. People that don't have an IDE are causing their own problems and should stop. People viewing the code on GitHub are not really analyzing it at the level that requires finely tracing through references usually and the terseness drastically outweighs the occasional annoyance when you are.

Re: Java 25 officially released

#122
post #39

More new programs should be written in Java/on the JVM. Most of the reasons Java dropped out of popularity no longer apply, and at this point it is an incredibly stable and mature ecosystem. I can come back to a Clojure program I wrote ten years ago and it runs great , meanwhile a TypeScript program I write 6 months ago requires a bunch of updating and cleanup.

I've been trying Java recently with IntelliJ and it's been funny watching Java's evolution from the IDE's suggestions. In Java a lot of code looks like this void foo(Bar bar); where Bar is an interface, and in many cases it only has one single method, so it looks like a callback that must be wrapped inside a class. Fortunately, Java lets you create anonymous classes to use these methods. void foo(new Bar { @override…

Doesn't java now let you have both private methods in interfaces and default implementations of the interface methods?

Re: Java 25 officially released

#123
post #39

More new programs should be written in Java/on the JVM. Most of the reasons Java dropped out of popularity no longer apply, and at this point it is an incredibly stable and mature ecosystem. I can come back to a Clojure program I wrote ten years ago and it runs great , meanwhile a TypeScript program I write 6 months ago requires a bunch of updating and cleanup.

> I can come back to a Clojure program I wrote ten years ago and it runs great

Is that thanks to JVM or due to the way how Clojure works? Because I can share the same anecdotes for my Clojurescript projects. I can grab any old nbb script and things just work off the bat - sometimes I have to update some npm dependency, but most of the time, things simply aren't horribly broken. Meanwhile, I just spent half a day jumping around for weird Python dependency and venv magic dance, just for the sake of running five interdependent scripts.

Re: Java 25 officially released

#124
post #82
post #39

More new programs should be written in Java/on the JVM. Most of the reasons Java dropped out of popularity no longer apply, and at this point it is an incredibly stable and mature ecosystem. I can come back to a Clojure program I wrote ten years ago and it runs great , meanwhile a TypeScript program I write 6 months ago requires a bunch of updating and cleanup.

Oracle makes me too uneasy. Can I use Java without the worry of incurring Oracle's wrath? Maybe, if I make sure I use openjdk/jump through some hoops I'll be fine. Or, I could just use any other language and not have that worry looming over me. C# is right there if I want a java-like experience without the anxiety of Oracle breaking my kneecaps. I don't know how to use java and not violate one of Oracle's EULAs. I co…

My semi-conspiracy theory is that the success of Rust is partially due to BigTech companies searching for a "legally-safe" alternative to Java.

The multi-year Google vs Oracle lawsuit put the likes of Amazon and Facebook to unease. And meanwhile there was this safe and performant language with no strings attached under a nice Apache license. They quickly made a Foundation around it as a 501(c)(6) - trade association, and not a "public good"-kind of a non-profit. This essentially means that as long as you're a member and pay the fees you won't be sued - exactly what all these companies wanted. So now they all keep up the funding and employ some of the compiler developers to keep the lights on for next 20 years or longer.

The fact that the language itself is really good for what they need it for is obviously the major reason why they support it, but the legal side of things definitely helped with adoption.

Re: Java 25 officially released

#125

Earlier quoted context omitted.

> it's verbose and boring to use. Python code that follows traditional Python paradigms is called "Pythonic". Java code that follows Java paradigms is called "awful". To be fully transparent, I've never written Java professionally, only for a couple small hobby projects 10 years ago, plus some while in school, so my opinion isn't worth the pixels you're reading it on, but I look at most Java code with abject horror.…

I think a lot of it is the people using it and certain parts of the culture. There are a lot of Enterprise TM programmers that seem to believe as many layers of abstraction and as much verbosity as possible with little tiny methods that do practically nothing leads to better solutions. It is totally possible to write concise and pragmatic code with Java. One thing that will be a thorn in your side though is null hand…

In my opinion at this point null handling is the one remaining thing about Java that is genuinely bad technically

Re: Java 25 officially released

#126

Earlier quoted context omitted.

Java was thriving during the golden age of Eclipse Foundation and IDE. JetBrains is very much recent.

> JetBrains is very much recent. JetBrains is 25 years old, almost as old as Java.

IntelliJ use wasn't that widespread until about 10-15 years ago. Java was thriving before that.

Re: Java 25 officially released

#127
post #119
post #82

Earlier quoted context omitted.

Oracle makes me too uneasy. Can I use Java without the worry of incurring Oracle's wrath? Maybe, if I make sure I use openjdk/jump through some hoops I'll be fine. Or, I could just use any other language and not have that worry looming over me. C# is right there if I want a java-like experience without the anxiety of Oracle breaking my kneecaps. I don't know how to use java and not violate one of Oracle's EULAs. I co…

> C# is right there if I want a java-like experience without the anxiety of Oracle breaking my kneecaps. Is Microsoft really better than Oracle in that regard?

If we look at .NET vs Java, then yes, Microsoft is better. Microsoft may charge for some of its dev tools (Visual Studio etc), but .NET itself is and was always totally free.

Re: Java 25 officially released

#128
post #39

More new programs should be written in Java/on the JVM. Most of the reasons Java dropped out of popularity no longer apply, and at this point it is an incredibly stable and mature ecosystem. I can come back to a Clojure program I wrote ten years ago and it runs great , meanwhile a TypeScript program I write 6 months ago requires a bunch of updating and cleanup.

Java has the same problem most imperative languages do, which is the lack of clear separation between mutable and immutable state, rigorously enforced by tooling. Many large-scale Java programs try and work around this by using immutable collections, which certainly makes a difference but can only go so far.

Java has the additional issue of being object-oriented, which leads to spaghetti parent-child relationships under stress.

Re: Java 25 officially released

#129
post #74
post #47

Earlier quoted context omitted.

I'm secretly hoping that Kotlin and Compose will bring back Desktop apps on the JVM :-).

I write desktop app on JavaFX (one Kotlin one pure Java). I don't see any problems why we should wait, it's production ready

I mean, I agree that it is really good! I'm just hoping that it will come in fashion, versus those ElectronJS... things.

Re: Java 25 officially released

#130
post #54
post #47

Earlier quoted context omitted.

I'm secretly hoping that Kotlin and Compose will bring back Desktop apps on the JVM :-).

I'm rooting against Kotlin since it appears to be only usable with the JetBrains ide. I'm totally blind and Jetbrains tools are not nearly as accessible or easy to use as VS Code with all the Java extensions in my experience. At all the jobs I've had no one cared if I didn't use Idea, but considering it looks like there's no good VS Code tooling for Kotlin if I have to use Kotlin professionally it's going to be painf…

Oh I didn't know about that. Is JetBrains improving on accessibility, at least, or not really?
Post reply on HN