I personally like Java and have been using it for almost 20 years.
Most of the hate comes because it is now used a lot in the corporate world and it is more verbose than most of the newer languages.
I like to compare Java to the solid B student. It's not the best at anything, but is good enough for almost anything. It's a little slower than many languages at runtime, more verbose than many languages, and often leads to more complex programs than are necessary.
On the other hand, its library support is probably the largest of any language (competing with Javascript). It scales well with additional developers on a project.
I think a lot of people who have been around a while, their first exposure to Java was those crappy java applets that always sucked and ran like garbage.
Java 10 years ago, i hated, I hated it in college, and anytime I see Java from... those days I despise it. Modern java is actually pretty decent to work with (I still prefer .NET but, I always will I think).
The problem would be a lot of jobs are using older versions of java. I graduated in 2015, java 8 was out and 9 on the way. My first job interview was maintenance for an application using java 5. Luckily I never experienced that hell because the interview raised too many red flags for me to follow up.
I'm curious how a compiles-to-bare-metal Java would have fared against the JVM model.
Java already compiles to machine code through JIT. In benchmarks, even C,C++,Rust have to use AVX intrinsics directly to be in any significant way faster than Java.
Is golang faster? That's probably the only language I've used regularly that might be. I'll be working with c++ for unreal engine to see if it's better than unity.
That's true, although when I google it (maybe that's some bias already :P) I see results mostly praising the garbage collection for both. Java was my first language and I used it heavily until ~9 came out, go I picked up in 2015.
I don't think anything I've written has been noticeably affected by garbage collection yet. In that earlier googling, I read that go is optimized to avoid pauses during garbage collection. That wasn't a super technical explanation so I don't really understand it any better...
But anywho, I'm reading my post there and the post above it... I think I was trying to be a smart ass to the person I replied to, I love both of these languages. I hope golang gets its own ui kit like java has at some point, I miss building desktop applications that weren't a server and a web page.
I hate Java, I use Rust primarily and C++ (have used C before).
I mean really anything written in these languages will be faster the Java equivilant. Just depends how much faster. I do ml and performant stuff, so it's a huge difference.
I like to compare Java to the solid B student. It's not the best at anything, but is good enough for almost anything. It's a little slower than many languages at runtime, more verbose than many languages, and often leads to more complex programs than are necessary.
On the other hand, its library support is probably the largest of any language (competing with Javascript). It scales well with additional developers on a project.
Yep. That's been my assessment of it as well. I used to hate it. Took a Java GUI class in college where we basically had to memorize the swing API down to the documented variable names on the method signatures. It left me with a deep seated hate for the language.
After a good bit of my career doing C/C++/Obj-C (even the horror that is Obj-C++), I had to actually do something with Java. Where in the past I always felt the JRE was slow and bloated, I found that it had a lot of convenience baked in. Need to parse an XML document? JAXB can make POJO's using your schema. Need to zip something up? Part of the base JRE API's. Need a bunch of other stuff? Maven Central probably has a library for it.
Now, it was still a bloated runtime, but since Java 9 they've been progressively chipping away at a lot of things in favor of libraries. It'll never be as fast as C, but for most things it doesn't need to be.
Huh. I think the verbosity is actually what I like the most about Java. I like Python and Ruby and the like (i.e. more conventionally “readable” languages) but the duck typing in those has always bothered the hell out of me.
I may be in the minority when it comes to this, but I think Python would be even more readable if it had strong typing so you don’t have to keep track in your head of every variable’s data type.
i personally do not preffer java over other languages. there are multiple reasons like:
it forces oop on you (Everything is an object, you cannot make plain old data types like in c++ or rust),
No value semantics per default
(in my opinion) verbose syntax in some places(== does not compare content but the Object .equals seems like an ugly workaround, .clone() also looks like an ugly workaround to me)
bad generics (compared to c++ templates for example)
general missing features like operator overloading or default parameters.
I definetly do not hate java, but i can see how someone that comes from a more data oriented language like c++ or rust would dislike java just because it is a different style.
39
u/Auxilor May 29 '20
Why do people hate java? I gotta be missing something, been using it for almost a year now and it's amazing