Right, absolutely correct, Java is a great choice, so why does this post keep going on about Go?
I used to love Java but the complexity merchants showed up and ruined the party. 1.5 was just coming out when I stopped doing Java dev. Kotlin might pull me back into the fold though for when I can't use Go.
https://en.wikipedia.org/wiki/Java_version_history#Java_SE_8...
To be clear, all the annotation and Java EE stuff is still going if you want it!
Java's warts are far worse than Go. Everything is nullable. There's no module system to speak of. It's so IDE-dependant.
I agree with the spirit of "use boring technology." So thank god Go is boring enough that I don't have to write Java anymore.
Only reference types, the same as in golang (which also has nullable pointers, and its interfaces interact weirdly with null). Java is getting value types, which can be declared as non-nullable.
> There's no module system to speak of.
https://dev.java/learn/modules/
> It's so IDE-dependant.
Modern Java has been simplified that you can run a hello world program as follows:
$ cat Hello.java
void main() {
IO.println("Hello");
}
$ java Hello.java
Hello
Furthermore, any non-trivial project is better served with an IDE, regardless of language.Everything's a reference in Java except primitives, and even primitives get object wrappers. In Java, String, Long, and Bool can all be null. Go isn't like that—only explicit pointer types and interfaces can be nil. In practice it really cuts down on NPEs.
> https://dev.java/learn/modules/
Ok, granted, but I have never seen these in actual use. Java's ecosystem is big enough that you can use Java for years and not even know it has modules. I find this profusion of features unboring for the same reason that C++ is unboring.
In Go, everything's already in modules. It's just simpler. And when they did add generics, it was backwards-compatible, so there was no Java 8/Java 11 thing.
> Furthermore, any non-trivial project is better served with an IDE
In any other language, I can get by fine with vim + LSP regardless of project size. Java has a uniquely bad LSP story.