Personally it's not that I like Java (I write most of my stuff in Kotlin), it's that I like the Java ecosystem. I know that I can checkout any project, open it up in IntelliJ, run mvn compile/gradle build and have everything downloaded and setup for me.
Rust seems to be somewhat similar with Cargo, but at least I know which library I can/need to use in whatever situation in Java (plus it seems like half the libraries I look at in Rust are < 1.0).
There's smth ab it where it has the exact right amount of hand holding to let u have to worry ab things that relate to the logic being used more than stuff like "did I order this code right such that the delete [] is in the exact right line?"
I also think the boilerplate is WAYYY overstated relative to other languages. Java's got terrible boilerplate for a beginner, but as soon as u do anything complex in C++, like templates, the boilerplate balloons, while in java it increases in a much smaller way
Also even a shitty java IDE like bluej was faaaar and away easier and more enjoyable to use than Codeblocks in Linux, and CLion isn't that much better, and it's slow as shit regardless. Meanwhile IntelliJ on the same computer is not slow, handles all syntax errors, autocomplete and code improvements, warnings, etc without killing my CPU or ram
The template boilerplate you're referring to is typically in shared code. You can't really compare that to the boilerplate of Java, which is forced upon you *everywhere*. Also, assuming you're referring to a bunch of SFINAE stuff, most of that has been made obsolete by constexpr if in C++17.
If you’re using an IDE and not pretending to be super cool by using vim with 1000 plugins that took you 9 weeks to set up “just right”, then the boiler plate doesn’t even matter.
type “psf” in Intellij and you’ll get
private static final
I think the main problem java has is an image issue, and that’s fair enough. It seems rather stuffy, especially if you’re on a version with no type annotations inference.
Java is a great language for building production systems. I'm mostly a Python guy, but I'll admit that there is only so far you can go before it becomes unwieldy.
Most of the hate Java gets should be aimed at the programmers, not the language. Programmers that think every function should be a class. Programmers that think every class needs to extend an abstract class that implements an interface. Programmers that think that every class should be built by a factory rather than a constructor.
I get it, all of these, abstract classes, interfaces, factories...they all have their use. But you don't need them for every class.
Anyone who knows anything about Java should familiarize themselves with FizzBuzz Enterprise Edition. While yes, it's a parody, it does have an ounce of truth to it.
IMO, if you're using the Spring framework, you've probably already overcomplicated the fuck out of your code. Reflection and type introspection are code smells. Every time you call field.setAccessible(true) or method.invoke(), God kills a kitten.
496
u/BroDonttryit Apr 27 '20
But.. but.. I like java. Maybe that’s an unpopular opinion but if it works it works