Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As someone who isn't super proficient in Java I usually find Java daunting to get started with full of buckets of "meta" issues like in my other comment.

What JVM do I use? Does it matter?

Does it matter what version I install, what if I have to install/manage multiple versions?

If I want to write a web service can I use vanilla Java stdlib or do I have to use Spring or some framework? If I use Spring, do I have to get into the weeds of dependency injection and other complexity to actually get my app off the ground?

With Go, none of those questions exist. I install the latest Go, create a main.go file, I use net/http and I'm off to the races.



I think it's good that Go, among other well-made toolchains, brought attention to importance of good CLI UX.

But it's not something that is unique to Go:

    dotnet new web
    dotnet run
    curl localhost:5050
also 'dotnet watch' for hot-reload.


> What JVM do I use?

latest LTS (longterm-support) version, so currently 21, next 25 (late 2025).

> Does it matter?

new is always better

> what if I have to install/manage multiple versions?

https://sdkman.io/

> If I want to write a web service can I use vanilla Java stdlib or do I have to use Spring or some framework?

Spring

> If I use Spring, do I have to get into the weeds of dependency injection

yes, but it's not hard (or I've done it long enough)

> other complexity

that might just be inherent complexity when have to deal with a webservice. personally I dislike have to configure security

So basically go to Spring Initializr (https://start.spring.io/) pick the latest LTS Java&Maven (or Kotlin&Gradle-Kotlin) and You're off to the races.


Besides what neonsunset points out for .NET world, where alongside C#, we get the pleasure to enjoy F#, VB and C++/CLI, it is relatively easy for Java.

When one doesn't know, just like with Go, one picks up the reference implementation => OpenJDK.

For basic stuff, the standard library also has you covered in the jdk.httpserver module.

By the way, where is the Swing equivalent on Go's standard library?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: