4 ms·
> The boring choice is the right choice. It always was. Right, absolutely correct, Java is a great choice, so why does this post keep going on about Go?
by twic 5mo ago
> The boring choice is the right choice. It always was.
Right, absolutely correct, Java is a great choice, so why does this post keep going on about Go?
- baalimago 5mo agoLack of extensive standard library, for one. But yeah Java is pretty great. Spring boot/quarkus especially
- VoodooJuJu 5mo ago[dead]
- mey 5mo agoWhere my brain went.
- vhodges 5mo agoEJB, Spring, Ant, Struts (I'm getting old - Like Hot Java Alpha 3 and Java applets old), maven, pom files, etc. 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.
- jeberle 5mo agoThe good stuff landed in Java 8, so you left the party too early. From Java 8 on it has changed direction completely (less OO + JavaBeans, more functional + ADTs). It feels like a completely different language from the Java 1.4 / 5 days. https://en.wikipedia.org/wiki/Java_version_history#Java_SE_8_(LTS) https://en.wikipedia.org/wiki/Java_version_history#Java_SE_8...
- therealdrag0 5mo agoYou can write apps without that stuff? Sure you should have 1 dependency management system, but otherwise you can write clean JVM apps in many languages, without DI or much else.
- twic 5mo agojeberle made a completely factual reply to this, but people hate Java so much it's downvoted to dead.
- twic 5mo agoThat was a long and dark time in history. We're still in the shadow of it. But these days a much better world is available - a more powerful language, good libraries, and much, much simpler frameworks. To be clear, all the annotation and Java EE stuff is still going if you want it!
- bccdee 5mo agoMy big issue with Go is, the language just isn't that great. Zero values instead of sum types, reflection instead of proper macros, a mediocre module system… 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.
- za3faran 5mo ago> Everything is nullable 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/ 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.
- bccdee 5mo ago> Only reference types, the same as in golang 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/ 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.
- za3faran 5mo ago
- gib444 5mo agoWell, Spring (Boot) is so hard to avoid running into at day jobs. And Spring is hell.
- ptdorf 5mo agoGo probably wouldn't exist if Java devs went easy on overengineering design patterns. But overall Java, like Go, IS a boring language. And that's a compliment.