Hacker News new | ask | show | jobs
by f2hex 457 days ago
Why are we still using Java for these kinds of solutions today?
2 comments

Can you elaborate on that? Then I can better respond to your specific points on why it shouldn't be used
Well, it would necessitate a dedicated conversation. In my opinion, there are better languages and runtimes available today to create such solutions, such as Go and Rust, to name a couple of the most suitable ones.

I believe Java is no longer an appealing choice for these types of tools, but I still like the project and its development process.

So far I'm happy with the choice. The ecosystem is mature, the build tools (maven/gradle) are solid to build this more complicated project, JavaFX works well enough to realize cross-platform applications, and the performance with modern JIT compilation from GraalVM is good. Currently I'm not missing something important from the tech stack.

Next week, when JDK 24 is released for the general availability, I plan to immediately switch to that as there will be additional performance gains with Project Leyden's AOT compilation and Project Liliput's memory improvements. So I'm positive for the future.

Neither Go nor Rust have a GUI toolkit anywhere close to the capabilities of JavaFX, so in practice such an app would largely be written in JavaScript. If you want to use one language for your desktop app, be portable, and avoid the complexities that come with web development, Java is the best possible choice today (arguably the only choice other than maybe Qt).
Go and Rust are more suited than Java for building graphical user interfaces that run cross-platform? That would be news to me.

Sure it can be done, but it's not exactly like there are well-established solutions for this.

Can you name the top three reasons why Go or Rust would be better for this?
1. Rust is cool, 2. Go is cool, 3. Java is uncool.
That is pretty persuasive!
why not? cross platform, lots of ui toolkits, huge ecosystem of packages and tools.

tbh java is a perfect choice for a tool like this. building it in rust or go would take 10x the time.